The x coordinate of a 2D point.
The y coordinate of a 2D point.
Returns the clockwise angle in degrees from the x-axis to the Vector2.
Returns the distance from the origin to the Vector2.
Returns the square of the distance from the origin to the Vector2. Faster than dist().
The scale factor required to normalize the Vector2. Returns 1 if the distance from the origin is 0.
Converts the Vector2 to a PolarCoordinate.
Returns the clockwise angle in radians from the x-axis to the Vector2.
Returns the string form of a Vector2 in the form (x, y). Same as toString().
Static downStatic leftStatic randomStatic rightStatic upStatic zeroStatic fromConverts a PolarCoordinate into a Vector2.
Static fromGenerated using TypeDoc
A point in 2D space using a cartesian coordinate system. Includes extra methods for math and utility.
-X is left. +X is right. -Y is up. +Y is down.