Returns the angle of the vector relative to the positive X-axis in radians
Returns the length (magnitude) of the vector
Returns the squared length (more efficient)
StaticlerpStaticisStaticfromStaticfromReturns a new Vector2 representing a unit vector pointing in the given angle (radians)
Returns angle from this vector to vec in radians, optionally offset by a "dot product" angle and a direction
target vector
Optionaldot: numberoptional cosine of angle to offset
Optionaldir: number = 1direction: 1 = CW, -1 = CCW
Returns a normalized vector (length = 1)
Alignment Dot product with another vector (normalized)
-1 .. 1 if vectors are normalized
Returns a string representation
Clones a vector.
2D Vector class similar to Godot's Vector2