StaticclampStaticdegStaticgetCalculate angle between two point in radians
X coordinate of the first point
X coordinate of the second point
Y coordinate of the first point
Y coordinate of the second point
Angle in radians
StaticgetSigned shortest angular difference between two angles in radians
The result is in (-PI, PI], so from + delta is angle-equivalent
to to while rotating the short way around.
Start angle in radians
End angle in radians
Signed delta in radians
StaticgetCalculate distance between two point
X coordinate of the first point
X coordinate of the second point
Y coordinate of the first point
Y coordinate of the second point
Distance between the two points
StaticgetCalculate point on line
Angle of the line in degrees
X coordinate of the line start point
Y coordinate of the line start point
Distance from the start point to the point on the line
Point on the line
StaticradStaticrandom
Utility class providing static methods for mathematical operations.
This class contains mathematical operations for working with 2D points and vectors. All methods are static and can be used without instantiating the class.
Example