Optionalx: number = 0The x coordinate of the vector.
Optionaly: number = 0The y coordinate of the vector.
Static ReadonlyNegA unit vector pointing in the negative x-axis.
Static ReadonlyNegA unit vector pointing in the nega y-axis.
Static ReadonlyXA unit vector pointing in the x-axis.
Static ReadonlyYA unit vector pointing in the y-axis.
Static ReadonlyZeroA vector whose x and y values will remain 0.
Returns a copy of this.
Returns the distance between this vector and another vector.
The other vector.
Returns the squared distance between this vector and another vector.
The other vector.
Returns length of this vector.
Returns the length squared of this vector.
Multiplies a scalar value with this vector's component values.
Makes this a unit vector.
Negates the values of this vector.
Subtracts a scalar value from this vector's component values.
StaticaddStaticaddStaticangleStaticclampStaticcopyStaticcrossStaticcrossStaticdistanceStaticdistanceStaticdivideStaticdivideStaticdotStaticequalStaticfromStaticinvertStaticlerpStaticmagnitudeStaticmagnitudeStaticmultiplyStaticmultiplyStaticnormalStaticnormalizeStaticrandomStaticreflectStaticreverseStaticrotateStaticrotateStaticsetStaticsetStaticsplatStaticsubtractStaticsubtractStatictoReturns the angle in radians between the positive x-axis and the vector.
This is a 2D vector class.