Creates a new Vector2 from the given x and y coordinates
defines the first coordinate
defines the second coordinate
defines the first coordinate
defines the second coordinate
Copy the current vector to an array
a new array with 2 elements: the Vector2 coordinates.
Gets a new Vector2 copied from the Vector2
a new Vector2
Updates the Vector2 from the sparsely populated value.
The sparsely populated value to read from.
Sets the Vector2 coordinates with the given floats
defines the first coordinate
defines the second coordinate
the current updated Vector2
Gets a boolean if two vectors are equals
defines the other vector
true if the given vector coordinates strictly equal the current Vector2 ones
Gets a boolean if two vectors are equals (using an epsilon value)
defines the other vector
defines the minimal distance to consider equality
true if the given vector coordinates are close to the current ones by a distance of epsilon.
Gets a new Vector2 from current Vector2 floored values
a new Vector2
Gets a new Vector2 from current Vector2 floored values
a new Vector2
Gets class name
the string "Vector2"
Gets current vector hash code
the Vector2 hash code as a number
Gets the length of the vector
the vector length (float)
Gets the vector squared length
the vector squared length (float)
Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats
defines the first coordinate
defines the second coordinate
a new Vector2
Gets a new Vector2 with current Vector2 negated coordinates
a new Vector2
Normalize the vector
the current updated Vector2
Returns a new Vector2 scaled by "scale" from the current Vector2
defines the scaling factor
a new Vector2
Multiply the Vector2 coordinates by scale
defines the scaling factor
the current updated Vector2
Sets the Vector2 coordinates with the given floats
defines the first coordinate
defines the second coordinate
the current updated Vector2
Sets the Vector2 coordinates in the given array or Float32Array from the given index.
defines the source array
defines the offset in source array
the current Vector2
Returns a JSON representation of this vector. This is necessary due to the way Actors detect changes on components like the actor's transform. They do this by adding properties for observation, and we don't want these properties serialized.
Gets a string with the Vector2 coordinates
a string with the Vector2 coordinates
Gets a new Vector2 located for "amount" (float) on the CatmullRom spline defined by the given four Vector2
defines 1st point of control
defines 2nd point of control
defines 3rd point of control
defines 4th point of control
defines the interpolation factor
a new Vector2
Returns a new Vector2 set with same the coordinates than "value" ones if the vector "value" is in the square defined by "min" and "max". If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate. If a coordinate of "value" is greater than "max" coordinates, the returned Vector2 is given this "max" coordinate
defines the value to clamp
defines the lower limit
defines the upper limit
a new Vector2
Gets the shortest distance (float) between the point "p" and the segment defined by the two points "segA" and "segB".
defines the middle point
defines one point of the segment
defines the other point of the segment
the shortest distance
Gets a new Vector2 set from the given index element of the given array
defines the data source
defines the offset in the data source
a new Vector2
Sets "result" from the given index element of the given array
defines the data source
defines the offset in the data source
defines the target vector
Returns a new Vector2 located for "amount" (float) on the Hermite spline defined by the vectors "value1", "value3", "tangent1", "tangent2"
defines the 1st control point
defines the outgoing tangent
defines the 2nd control point
defines the incoming tangent
defines the interpolation factor
a new Vector2
Gets a new Vector2(1, 1)
a new Vector2
Determines if a given vector is included in a triangle
defines the vector to test
defines 1st triangle point
defines 2nd triangle point
defines 3rd triangle point
true if the point "p" is in the triangle defined by the vertors "p0", "p1", "p2"
Gets a new Vector2(0, 0)
a new Vector2
Class representing a vector containing 2 coordinates