Vec2:angle
EditReturns the angle between vectors.
Arguments
Name | Type | Description |
u | Vec2 | The other vector. |
Returns
Name | Type | Description |
angle | number | The angle to the other vector, in radians. |
Arguments
Name | Type | Description |
x | number | The x component of the other vector. |
y | number | The y component of the other vector. |
Returns
Name | Type | Description |
angle | number | The angle to the other vector, in radians. |
Notes
If any of the two vectors have a length of zero, the angle between them is not well defined. In this case the function returns math.pi / 2
.