A 2-dimensional vector. Typically represents a position or size in 2D space.
Abs |
Returns a new vector with all values positive. -5 becomes 5, etc. |
AlmostEqual |
Returns true if we're nearly equal to the passed vector. |
Clamp |
Returns a vector each axis of which is clamped to between the 2 given vectors. Basically clamps a point to a square. |
ComponentMax |
Returns a vector that has the maximum values on each axis between this vector and given vector. |
ComponentMin |
Returns a vector that has the minimum values on each axis between this vector and given vector. |
LerpTo |
Linearly interpolate from this vector to given vector. |
SnapToGrid |
Snap to grid along all 3 axes. |
WithX |
Return this vector with given X. |
WithY |
Return this vector with given Y. |
Direction |
Calculates the normalized direction vector from one point to another in 2D space. |
Distance |
Returns distance between the 2 given vectors. |
DistanceBetween |
Returns distance between the 2 given vectors. |
DistanceBetweenSquared |
Returns squared distance between the 2 given vectors. This is faster than <see cref="M:Vector2.DistanceBetween(Vector2,Vector2)">DistanceBetween</see>,
and can be used for things like comparing distances, as long as only squared values are used. |
DistanceSquared |
Returns squared distance between the 2 given vectors. This is faster than <see cref="M:Vector2.DistanceBetween(Vector2,Vector2)">DistanceBetween</see>,
and can be used for things like comparing distances, as long as only squared values are used. |
Dot |
Returns dot product between the 2 given vectors. |
FromDegrees |
Returns a point on a circle at given rotation from X axis, counter clockwise. |
FromRadians |
Returns a point on a circle at given rotation from X axis, counter clockwise. |
Lerp |
Linearly interpolate from point a to point b. |
Max |
Returns a vector that has the maximum values on each axis between the 2 given vectors. |
Min |
Returns a vector that has the minimum values on each axis between the 2 given vectors. |
Parse |
Given a string, try to convert this into a Vector2. Example formatting is "x,y", "[x,y]", "x y", etc. |
TryParse |
|