Property | Type | Description | |
---|---|---|---|
Array | Vector2[] | ||
X | float | ||
Y | float |
Method | Description | |
---|---|---|
Add ( Vector2 value1, Vector2 value2 ) : Vector2 |
Adds two vectors.
|
|
Add ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Adds two vectors.
|
|
Barycentric ( Vector2 value1, Vector2 value2, Vector2 value3, float amount1, float amount2 ) : Vector2 |
Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
|
|
Barycentric ( Vector2 &value1, Vector2 &value2, Vector2 &value3, float amount1, float amount2, Vector2 &result ) : void |
Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
|
|
CatmullRom ( Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount ) : Vector2 |
Performs a Catmull-Rom interpolation using the specified positions.
|
|
CatmullRom ( Vector2 &value1, Vector2 &value2, Vector2 &value3, Vector2 &value4, float amount, Vector2 &result ) : void |
Performs a Catmull-Rom interpolation using the specified positions.
|
|
Clamp ( Vector2 value1, Vector2 min, Vector2 max ) : Vector2 |
Restricts a value to be within a specified range.
|
|
Clamp ( Vector2 &value1, Vector2 &min, Vector2 &max, Vector2 &result ) : void |
Restricts a value to be within a specified range.
|
|
Distance ( Vector2 value1, Vector2 value2 ) : float |
Calculates the distance between two vectors.
|
|
Distance ( Vector2 &value1, Vector2 &value2, float &result ) : void |
Calculates the distance between two vectors.
|
|
DistanceSquared ( Vector2 value1, Vector2 value2 ) : float |
Calculates the distance between two vectors squared.
|
|
DistanceSquared ( Vector2 &value1, Vector2 &value2, float &result ) : void |
Calculates the distance between two vectors squared.
|
|
Divide ( Vector2 value1, Vector2 value2 ) : Vector2 |
Divides the components of a vector by the components of another vector.
|
|
Divide ( Vector2 value1, float divider ) : Vector2 |
Divides a vector by a scalar value.
|
|
Divide ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Divides the components of a vector by the components of another vector.
|
|
Divide ( Vector2 &value1, float divider, Vector2 &result ) : void |
Divides a vector by a scalar value.
|
|
Dot ( Vector2 value1, Vector2 value2 ) : float |
Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a floating point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.
|
|
Dot ( Vector2 &value1, Vector2 &value2, float &result ) : void |
Calculates the dot product of two vectors and writes the result to a user-specified variable. If the two vectors are unit vectors, the dot product returns a floating point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.
|
|
Equals ( Vector2 other ) : bool |
Determines whether the specified Object is equal to the Vector2.
|
|
Equals ( object obj ) : bool |
Returns a value that indicates whether the current instance is equal to a specified object.
|
|
GetHashCode ( ) : int |
Gets the hash code of the vector object.
|
|
Hermite ( Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount ) : Vector2 |
Performs a Hermite spline interpolation.
|
|
Hermite ( Vector2 &value1, Vector2 &tangent1, Vector2 &value2, Vector2 &tangent2, float amount, Vector2 &result ) : void |
Performs a Hermite spline interpolation.
|
|
Length ( ) : float |
Calculates the length of the vector.
|
|
LengthSquared ( ) : float |
Calculates the length of the vector squared.
|
|
Lerp ( Vector2 value1, Vector2 value2, float amount ) : Vector2 |
Performs a linear interpolation between two vectors.
|
|
Lerp ( Vector2 &value1, Vector2 &value2, float amount, Vector2 &result ) : void |
Performs a linear interpolation between two vectors.
|
|
Max ( Vector2 value1, Vector2 value2 ) : Vector2 |
Returns a vector that contains the highest value from each matching pair of components.
|
|
Max ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Returns a vector that contains the highest value from each matching pair of components.
|
|
Min ( Vector2 value1, Vector2 value2 ) : Vector2 |
Returns a vector that contains the lowest value from each matching pair of components.
|
|
Min ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Returns a vector that contains the lowest value from each matching pair of components.
|
|
Multiply ( Vector2 value1, Vector2 value2 ) : Vector2 |
Multiplies the components of two vectors by each other.
|
|
Multiply ( Vector2 value1, float scaleFactor ) : Vector2 |
Multiplies a vector by a scalar value.
|
|
Multiply ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Multiplies the components of two vectors by each other.
|
|
Multiply ( Vector2 &value1, float scaleFactor, Vector2 &result ) : void |
Multiplies a vector by a scalar value.
|
|
Negate ( Vector2 value ) : Vector2 |
Returns a vector pointing in the opposite direction.
|
|
Negate ( Vector2 &value, Vector2 &result ) : void |
Returns a vector pointing in the opposite direction.
|
|
Normalize ( Vector2 value ) : Vector2 |
Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.
|
|
Normalize ( ) : void |
Turns the current vector into a unit vector. The result is a vector one unit in length pointing in the same direction as the original vector.
|
|
Normalize ( Vector2 &value, Vector2 &result ) : void |
Creates a unit vector from the specified vector, writing the result to a user-specified variable. The result is a vector one unit in length pointing in the same direction as the original vector.
|
|
Reflect ( Vector2 vector, Vector2 normal ) : Vector2 |
Determines the reflect vector of the given vector and normal.
|
|
Reflect ( Vector2 &vector, Vector2 &normal, Vector2 &result ) : void |
Determines the reflect vector of the given vector and normal.
|
|
SmoothStep ( Vector2 value1, Vector2 value2, float amount ) : Vector2 |
Interpolates between two values using a cubic equation.
|
|
SmoothStep ( Vector2 &value1, Vector2 &value2, float amount, Vector2 &result ) : void |
Interpolates between two values using a cubic equation.
|
|
Subtract ( Vector2 value1, Vector2 value2 ) : Vector2 |
Subtracts a vector from a vector.
|
|
Subtract ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void |
Subtracts a vector from a vector.
|
|
ToString ( ) : string |
Retrieves a string representation of the current object.
|
|
Transform ( Vector2 position, Matrix matrix ) : Vector2 |
Transforms the vector (x, y, 0, 1) by the specified matrix. Transforms a Vector2 by the given Matrix. Transforms a 2D vector normal by a matrix. Transforms a vector normal by a matrix. Transforms a single Vector2, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation. Transforms a Vector2, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation. Transforms an array of Vector2s by a specified Matrix. Transforms a specified range in an array of Vector2s by a specified Matrix and places the results in a specified range in a destination array. Transforms an array of Vector2 vector normals by a specified Matrix. Transforms a specified range in an array of Vector2 vector normals by a specified Matrix and places the results in a specified range in a destination array. Transforms an array of Vector2s by a specified Quaternion. Transforms a specified range in an array of Vector2s by a specified Quaternion and places the results in a specified range in a destination array.
|
|
Vector2 ( float value ) : System |
Creates a new instance of Vector2.
|
|
Vector2 ( float x, float y ) : System |
Initializes a new instance of Vector2.
|
|
operator ( ) : Vector2 |
Returns a vector pointing in the opposite direction.
|
|
operator ( ) : bool |
Tests vectors for equality.
|
public static Add ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | Vector2 |
public static Add ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] Sum of the source vectors. |
return | void |
public static Barycentric ( Vector2 value1, Vector2 value2, Vector2 value3, float amount1, float amount2 ) : Vector2 | ||
value1 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 1 of the triangle. |
value2 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 2 of the triangle. |
value3 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 3 of the triangle. |
amount1 | float | Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2). |
amount2 | float | Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3). |
return | Vector2 |
public static Barycentric ( Vector2 &value1, Vector2 &value2, Vector2 &value3, float amount1, float amount2, Vector2 &result ) : void | ||
value1 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 1 of the triangle. |
value2 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 2 of the triangle. |
value3 | Vector2 | A Vector2 containing the 2D Cartesian coordinates of vertex 3 of the triangle. |
amount1 | float | Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2). |
amount2 | float | Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3). |
result | Vector2 | [OutAttribute] The 2D Cartesian coordinates of the specified point are placed in this Vector2 on exit. |
return | void |
public static CatmullRom ( Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount ) : Vector2 | ||
value1 | Vector2 | The first position in the interpolation. |
value2 | Vector2 | The second position in the interpolation. |
value3 | Vector2 | The third position in the interpolation. |
value4 | Vector2 | The fourth position in the interpolation. |
amount | float | Weighting factor. |
return | Vector2 |
public static CatmullRom ( Vector2 &value1, Vector2 &value2, Vector2 &value3, Vector2 &value4, float amount, Vector2 &result ) : void | ||
value1 | Vector2 | The first position in the interpolation. |
value2 | Vector2 | The second position in the interpolation. |
value3 | Vector2 | The third position in the interpolation. |
value4 | Vector2 | The fourth position in the interpolation. |
amount | float | Weighting factor. |
result | Vector2 | [OutAttribute] A vector that is the result of the Catmull-Rom interpolation. |
return | void |
public static Clamp ( Vector2 value1, Vector2 min, Vector2 max ) : Vector2 | ||
value1 | Vector2 | The value to clamp. |
min | Vector2 | The minimum value. |
max | Vector2 | The maximum value. |
return | Vector2 |
public static Clamp ( Vector2 &value1, Vector2 &min, Vector2 &max, Vector2 &result ) : void | ||
value1 | Vector2 | The value to clamp. |
min | Vector2 | The minimum value. |
max | Vector2 | The maximum value. |
result | Vector2 | [OutAttribute] The clamped value. |
return | void |
public static Distance ( Vector2 value1, Vector2 value2 ) : float | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | float |
public static Distance ( Vector2 &value1, Vector2 &value2, float &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | float | [OutAttribute] The distance between the vectors. |
return | void |
public static DistanceSquared ( Vector2 value1, Vector2 value2 ) : float | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | float |
public static DistanceSquared ( Vector2 &value1, Vector2 &value2, float &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | float | [OutAttribute] The distance between the vectors squared. |
return | void |
public static Divide ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Divisor vector. |
return | Vector2 |
public static Divide ( Vector2 value1, float divider ) : Vector2 | ||
value1 | Vector2 | Source vector. |
divider | float | The divisor. |
return | Vector2 |
public static Divide ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | The divisor. |
result | Vector2 | [OutAttribute] The result of the division. |
return | void |
public static Divide ( Vector2 &value1, float divider, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
divider | float | The divisor. |
result | Vector2 | [OutAttribute] The result of the division. |
return | void |
public static Dot ( Vector2 value1, Vector2 value2 ) : float | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | float |
public static Dot ( Vector2 &value1, Vector2 &value2, float &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | float | [OutAttribute] The dot product of the two vectors. |
return | void |
public Equals ( Vector2 other ) : bool | ||
other | Vector2 | The Object to compare with the current Vector2. |
return | bool |
public Equals ( object obj ) : bool | ||
obj | object | Object to make the comparison with. |
return | bool |
public static Hermite ( Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount ) : Vector2 | ||
value1 | Vector2 | Source position vector. |
tangent1 | Vector2 | Source tangent vector. |
value2 | Vector2 | Source position vector. |
tangent2 | Vector2 | Source tangent vector. |
amount | float | Weighting factor. |
return | Vector2 |
public static Hermite ( Vector2 &value1, Vector2 &tangent1, Vector2 &value2, Vector2 &tangent2, float amount, Vector2 &result ) : void | ||
value1 | Vector2 | Source position vector. |
tangent1 | Vector2 | Source tangent vector. |
value2 | Vector2 | Source position vector. |
tangent2 | Vector2 | Source tangent vector. |
amount | float | Weighting factor. |
result | Vector2 | [OutAttribute] The result of the Hermite spline interpolation. |
return | void |
public static Lerp ( Vector2 value1, Vector2 value2, float amount ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
amount | float | Value between 0 and 1 indicating the weight of value2. |
return | Vector2 |
public static Lerp ( Vector2 &value1, Vector2 &value2, float amount, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
amount | float | Value between 0 and 1 indicating the weight of value2. |
result | Vector2 | [OutAttribute] The result of the interpolation. |
return | void |
public static Max ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | Vector2 |
public static Max ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] The maximized vector. |
return | void |
public static Min ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | Vector2 |
public static Min ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] The minimized vector. |
return | void |
public static Multiply ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | Vector2 |
public static Multiply ( Vector2 value1, float scaleFactor ) : Vector2 | ||
value1 | Vector2 | Source vector. |
scaleFactor | float | Scalar value. |
return | Vector2 |
public static Multiply ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] The result of the multiplication. |
return | void |
public static Multiply ( Vector2 &value1, float scaleFactor, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
scaleFactor | float | Scalar value. |
result | Vector2 | [OutAttribute] The result of the multiplication. |
return | void |
public static Negate ( Vector2 value ) : Vector2 | ||
value | Vector2 | Source vector. |
return | Vector2 |
public static Negate ( Vector2 &value, Vector2 &result ) : void | ||
value | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] Vector pointing in the opposite direction. |
return | void |
public static Normalize ( Vector2 value ) : Vector2 | ||
value | Vector2 | Source Vector2. |
return | Vector2 |
public static Normalize ( Vector2 &value, Vector2 &result ) : void | ||
value | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] Normalized vector. |
return | void |
public static Reflect ( Vector2 vector, Vector2 normal ) : Vector2 | ||
vector | Vector2 | Source vector. |
normal | Vector2 | Normal of vector. |
return | Vector2 |
public static Reflect ( Vector2 &vector, Vector2 &normal, Vector2 &result ) : void | ||
vector | Vector2 | Source vector. |
normal | Vector2 | Normal of vector. |
result | Vector2 | [OutAttribute] The created reflect vector. |
return | void |
public static SmoothStep ( Vector2 value1, Vector2 value2, float amount ) : Vector2 | ||
value1 | Vector2 | Source value. |
value2 | Vector2 | Source value. |
amount | float | Weighting value. |
return | Vector2 |
public static SmoothStep ( Vector2 &value1, Vector2 &value2, float amount, Vector2 &result ) : void | ||
value1 | Vector2 | Source value. |
value2 | Vector2 | Source value. |
amount | float | Weighting value. |
result | Vector2 | [OutAttribute] The interpolated value. |
return | void |
public static Subtract ( Vector2 value1, Vector2 value2 ) : Vector2 | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
return | Vector2 |
public static Subtract ( Vector2 &value1, Vector2 &value2, Vector2 &result ) : void | ||
value1 | Vector2 | Source vector. |
value2 | Vector2 | Source vector. |
result | Vector2 | [OutAttribute] The result of the subtraction. |
return | void |
public static Transform ( Vector2 position, Matrix matrix ) : Vector2 | ||
position | Vector2 | The source vector. |
matrix | Matrix | The transformation matrix. |
return | Vector2 |
public Vector2 ( float value ) : System | ||
value | float | Value to initialize both components to. |
return | System |
public Vector2 ( float x, float y ) : System | ||
x | float | Initial value for the x-component of the vector. |
y | float | Initial value for the y-component of the vector. |
return | System |