Creates a new 2-element vector with the given values.
The set functions create a new copy of the vector, updating a single field.
Extract the x component of a vector.
Extract the y component of a vector.
Update the x component of a vector, returning a new vector.
Update the y component of a vector, returning a new vector.
Vector addition: a + b
Vector subtraction: a - b
Vector negation: -a
Multiply the vector by a scalar: s * v
The dot product of a and b
A unit vector with the same direction as the given vector: a / |a|
The normalized direction from b to a: (a - b) / |a - b|
Multiply the vector values by other vector values: a * b
The length of the given vector: |a|
The square of the length of the given vector: |a| * |a|
The distance between two vectors.
The square of the distance between two vectors.
Get longest vector of two
Projecting one vector onto another
Convert a vector to a record.
Convert a record to a vector.
Two dimensional vector type