Create a 2D Vector from two numbers.
Optional
x: numberX coordinate of the vector.
Optional
y: numberY coordinate of the vector. Leave out to use the same value as x.
Create a 2D vector from a number tuple.
The X and Y coordinates of the vector.
Create a 2D vector from an object containing an x and y property.
The object to create from.
Readonly
xThe X coordinate of the vector.
Readonly
yThe Y coordinate of the vector.
Static
downStatic
leftStatic
nullStatic
rightStatic
upStatic
addStatic
clampClamp a value between a minimum and a maximum.
The value to clamp.
The minimum value.
The maximum value.
The clamped value.
Static
deserializeStatic
distStatic
divStatic
lerpMap a value between 0 and 1 to between a minimum and maximum value.
The value to lerp.
The minimum value to lerp from.
The maximum value to lerp to.
The lerped value.
Static
mulStatic
negateStatic
normalizeStatic
rotateStatic
rotateStatic
subStatic
unlerpMap a value between a minimum and maximum value to between 0 and 1.
The value to unlerp.
The minimum value to unlerp from.
The maximum value to unlerp to.
The unlerped value.
Represents a 2D vector in Among Us, i.e. a position or velocity.