This function calculates the angle between two vectors.
VectorAngle([Vector 1], [Vector 2])
Where:
Vector 1 is a pipe-bar delimited list representing the first vector (X|Y|Z).
Vector 2 is a pipe-bar delimited list representing the second vector (X|Y|Z).
Rule | Result |
---|---|
VectorAngle("20|37","38|27") | Will return the absolute angle (in degrees) between the two 2D vectors, 26.21 (values have been rounded for clarity). |
VectorAngle("20|37|58","38|27|28") | Will return the absolute angle (in degrees) between the two 3D vectors, 29.73 (values have been rounded for clarity). |
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.