Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
A version of VectorAngle for 2D vectors that can return negative angles
ResourceFunction["SignedVectorAngle"][u,v] gives the angle between the 2D vectors u and v, returning a positive number if v is counterclockwise relative to u and negative if clockwise. |
Return the angle between two vectors:
| In[1]:= |
| Out[1]= |
If the second vector is clockwise from the first vector, the result is negative:
| In[2]:= |
| Out[2]= |
The absolute value of SignedVectorAngle is always the same as VectorAngle:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= |
This work is licensed under a Creative Commons Attribution 4.0 International License