You are given an arbitrary angle $h$. It can be any angle from $0^\circ$ to $360^\circ$. You are also given an angle $v$, which is guaranteed to be between $-90^\circ$ and $90^\circ$. Find angle $a$ given these two angles. What is the equation to solve for any combination of these? I am using this to project 3D vectors into a single 2D isometric angle (for a video game that is 2D isometric using 3D physics).
Here is a truth table:
If $h=0^\circ, a=v$.
If $h=90^\circ, a=90^\circ$ if $v \geq 0^\circ$, $-90^\circ$ otherwise.
If $h=180^\circ, a=180^\circ - v$.
If $h=270^\circ, a=270^\circ$. (always!)
Here is an illustration:
