Really basic 2D vector class used for vector calculations
Vec2 constructor
X component of our Vec2
Y component of our Vec2
The type of the Vec2
Get the X component of the Vec2
Set the X component of the Vec2 Can trigger onChange callback
X component to set
Get the Y component of the Vec2
Set the Y component of the Vec2 Can trigger onChange callback
Y component to set
Optional
function assigned to the onChange callback
Called when at least one component of the Vec2 has changed
callback to run when at least one component of the Vec2 has changed
Set the Vec2 from values
new X component to set
new Y component to set
Add a Vec2 to this Vec2
Vec2 to add
Add a scalar to all the components of this Vec2
number to add
Subtract a Vec2 from this Vec2
Vec2 to subtract
Subtract a scalar to all the components of this Vec2
number to subtract
Multiply a Vec2 with this Vec2
Vec2 to multiply with
Multiply all components of this Vec2 with a scalar
number to multiply with
Divide a Vec2 with this Vec2
Vec2 to divide with
Divide all components of this Vec2 with a scalar
number to divide with
Copy a Vec2 into this Vec2
Vec2 to copy
Clone this Vec2
Apply max values to this Vec2 components
Vec2 representing max values
Apply min values to this Vec2 components
Vec2 representing min values
Clamp this Vec2 components by min and max Vec2 vectors
minimum Vec2 components to compare with
maximum Vec2 components to compare with
Check if 2 Vec2 are equal
Vec2 to compare
Get the square length of this Vec2
Get the length of this Vec2
Normalize this Vec2
Calculate the dot product of 2 Vec2
Vec2 to use for dot product
Calculate the linear interpolation of this Vec2 by given Vec2 and alpha, where alpha is the percent distance along the line
Vec2 to interpolate towards
interpolation factor in the [0, 1] interval
Really basic 2D vector class used for vector calculations
See