Calculates the signed angle between two vectors.
VectorSignedAngle(Vector 1, Vector 2, [Axis])
Where:
Vector 1 is a pipe-bar delimited list representing the first vector (for 2D vectors use X|Y, for 3D vectors use X|Y|Z)
Vector 2 is a pipe-bar delimited list representing the second vector (for 2D vectors use X|Y, for 3D vectors use X|Y|Z)
Axis (only required for 3D vectors) is a pipe-bar delimited list representing the axis vector (X|Y|Z) when working with 3D vectors.
Rule | Result | Meaning |
---|---|---|
VectorSignedAngle("20|37","38|27") | 26.2121847336299 | Returns the signed angle between the two given 2D vectors. |
VectorSignedAngle("20|37|10","38|27|90","10|10|10") | -52.639558897705 | Returns the signed angle between the two given 3D vectors. |
Floating Point Precision
Due to floating point precision, some calculations may not be as precise as expected.
This can be avoided by following the advice in the topic Info: Floating Point Precision.
Please see How To: Understanding Vector Functions for more information on Vectors, all the Vector functions provided in DriveWorks and use case examples.