Vector |
Defines a two component vector.
A default constructed one is Zero.
[SerializableAttribute] public struct Vector2 : IEquatable<Vector2>
The Vector2 type exposes the following members.
| Name | Description | |
|---|---|---|
| Vector2(Vector2) | Initializes a new instance of the Vector2 struct. | |
| Vector2(Double, Double) | Initializes a new instance of the Vector2 struct. |
| Name | Description | |
|---|---|---|
| Normalized | Vector2 normalization - make its length be 1 | |
| X | Gets or sets the X component of the Vector2 as a Single. | |
| XD | Gets or sets the X component of the Vector2 as a Double. | |
| Y | Gets or sets the Y component of the Vector2 as a Single. | |
| YD | Gets or sets the Y component of the Vector2 as a Double. |
| Name | Description | |
|---|---|---|
| Add(Vector2) | Add Vector2 to this Vector2 | |
| Add(Vector2, Vector2) | Vector2 addition | |
| Ccw(Vector2) | Cross product of two Vector2s | |
| Ccw(Vector2, Vector2) | Cross product of two Vector2s | |
| CcwD(Vector2) | Cross product of two Vector2s | |
| CcwD(Vector2, Vector2) | Cross product of two Vector2s | |
| Dot(Vector2) | Dot product of two Vector2s | |
| Dot(Vector2, Vector2) | Dot product of two Vector2s | |
| DotD(Vector2) | Dot product of two Vector2s | |
| DotD(Vector2, Vector2) | Dot product of two Vector2s | |
| Equals(Object) | Vector2 exact equality - see EQ(Vector2, Vector2) for alternative
(Overrides ValueTypeEquals(Object)) | |
| Equals(Vector2) | Vector2 exact equality - see EQ(Vector2, Vector2) for alternative | |
| GetHashCode |
Returns the hash code for the current Vector2.
(Overrides ValueTypeGetHashCode) | |
| Length | Length of Vector2 | |
| Length(Vector2) | Length of Vector2 | |
| LengthD | Length of Vector2 | |
| LengthD(Vector2) | Length of Vector2 | |
| LengthSq | Length squared of Vector2 | |
| LengthSq(Vector2) | Length squared of Vector3 | |
| LengthSqD | Length squared of Vector2 | |
| LengthSqD(Vector2) | Length squared of Vector3 | |
| Lerp(Vector2, Double) |
Linear interpolation between this Vector2 and another Vector2 This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns this. When t = 1 returns b. When t = 0.5 returns the point midway between this and b. | |
| Lerp(Vector2, Vector2, Double) |
Linear interpolation between two Vector2s
This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b. | |
| Maximize(Vector2) | Vector2 maximization - combination of the largest components | |
| Maximize(Vector2, Vector2) | Vector2 maximization - combination of the largest components | |
| Minimize(Vector2) | Vector2 minimization - combination of the smallest components | |
| Minimize(Vector2, Vector2) | Vector2 minimization - combination of the smallest components | |
| Multiply(Double) | Scale the X, and Y components of Vector2 | |
| Multiply(Vector2) | Scale the X and Y components of Vector2. | |
| Multiply(Vector2, Vector2) | Scale the X and Y components of Vector2 . | |
| Multiply(Vector2, Double) | Scale the X and Y components of Vector2 | |
| MultiplyAdd | Combined multiplication and addition | |
| Negate | Vector2 in-place negation. | |
| Normalize | Vector2 normalization - make its length be 1 | |
| Normalize(Vector2) | Vector2 normalization - make its length be 1 | |
| Scale(Double) | Scale the X and Y components of Vector2 | |
| Scale(Vector2) | Scale the X and Y components of Vector2. | |
| Scale(Vector2, Vector2) | Scale the X and Y components of Vector2 . | |
| Scale(Vector2, Double) | Scale the X and Y components of Vector2 | |
| Subtract(Vector2) | Vector2 subtraction | |
| Subtract(Vector2, Vector2) | Vector2 subtraction | |
| ToString |
Returns a string that represents the current Vector2.
(Overrides ValueTypeToString) | |
| Transform | Transforms a Vector2 by the given Matrix | |
| TransformCoordinate(Matrix) | Transform this Vector2 coordinate by Matrix | |
| TransformCoordinate(Vector2, Matrix) | Transform Vector2 coordinate by Matrix | |
| TransformNormal(Matrix) | Transform this Vector2 normal by Matrix | |
| TransformNormal(Quaternion) | Transform this Vector2 normal by Quaternion | |
| TransformNormal(Vector2, Matrix) | Transform Vector2 normal by Matrix | |
| TransformNormal(Vector2, Quaternion) | Transform Vector2 normal by Quaternion |
| Name | Description | |
|---|---|---|
| Addition(Vector2, Vector2) | Vector2 addition | |
| Equality(Vector2, Vector2) | Vector2 exact equality - see EQ(Vector2, Vector2) for alternative | |
| Inequality(Vector2, Vector2) | Vector2 exact inequality - see EQ(Vector2, Vector2) for alternative | |
| Multiply(Double, Vector2) | Scale the X and Y components of Vector2 | |
| Multiply(Vector2, Double) | Scale the X and Y components of Vector2 | |
| Subtraction(Vector2, Vector2) | Vector2 subtraction | |
| UnaryNegation(Vector2) | Vector2 unary negation |
| Name | Description | |
|---|---|---|
| Empty | A Vector2 with all of its components set to zero. | |
| MaxValue | A Vector2 with the maximum value | |
| MinValue | A Vector2 with the minimum value | |
| One | A Vector2 with all of its components set to one. | |
| Origin | A Vector2 with all of its components set to zero. | |
| XAxis | A Vector2 representing the unit X-Axis | |
| YAxis | A Vector2 representing the unit Y-Axis | |
| Zero | A Vector2 with all of its components set to zero. |