How to calculate signed angle in range $[-\pi..+\pi]$ between two vectors in 3D?
$acos\left(\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{a b}\right)$
gives always positive answer in the range of
$[0..2\pi)$
And
$asin\left(\frac{|\boldsymbol{a}\times\boldsymbol{b}|}{a b}\right)$
gives the answer in the range of
$[-\pi..\pi]$
I can calculate both and select appropriate answer, but is there united formula?
UPDATE
Sorry, I agree I need additional vector $\boldsymbol{n}$ to denote the direction of view. And the range will be $[-2\pi, +2\pi]$ then:
