Create a new Vector2 and initialize its components to zero.
Create a new Vector2 and initialize both of its components with the given value.
the value of both components
Create a new Vector2 and initialize its components to the given values.
the x component
the y component
Create a new Vector2 and initialize its components to the one of the given vector.
the {@link Vector2c} to copy the values from
The x component of the vector.
The y component of the vector.
Get the length of a 2-dimensional single-precision vector.
the length of the given vector
Divide this Vector2 component-wise by another Vector2c.
this
Divide all components of this Vector2 by the given scalar value.
the scalar to divide by
this
Divide the components of this Vector2 by the given scalar values and store the result in this
.
the x component to divide this vector by
the y component to divide this vector by
this
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in this
.
If t
is 0.0
then the result is this
. If the interpolation factor is 1.0
then the result is other
.
the other vector
the interpolation factor between 0.0 and 1.0
this
Multiply the components of this vector by the given scalar.
the value to multiply this vector's components by
this
Multiply the components of this Vector2 by the given scalar values and store the result in this
.
the x component to multiply this vector by
the y component to multiply this vector by
this
Multiply this Vector2 component-wise by another Vector2.
this
Multiply the given matrix with this Vector2 and store the result in this
.
this
Set this vector to be one of its perpendicular vectors.
this
Set the x and y components to the supplied value.
the value of both components
this
Set the x and y components to the supplied values.
the x component
the y component
this
Set this Vector2 to the values of v.
the vector to copy from
this
Set the value of the specified component of this vector.
the component whose value to set, : within<code>[0..1]</code>
the value to set
this
Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}.
the {@link NumberFormat} used to format the vector components with
the string representation
Set all components to zero.
this
Return the distance between (x1, y1)
and (x2, y2)
.
the x component of the first vector
the y component of the first vector
the x component of the second vector
the y component of the second vector
the euclidean distance
Return the squared distance between (x1, y1)
and (x2, y2)
.
the x component of the first vector
the y component of the first vector
the x component of the second vector
the y component of the second vector
the euclidean distance squared
Get the length squared of a 2-dimensional single-precision vector.
The vector's x component
The vector's y component
the length squared of the given vector
Generated using TypeDoc
Represents a 2D vector with single-precision.
RGreenlees
Kai Burjack
F. Neurath