Assembly: VRage.Math.dll

public struct Vector2: IEquatable<Vector2>

Defines a vector with two components.

Fields

Member Description
static One
static PositiveInfinity
static UnitX
static UnitY
static Zero
X Gets or sets the x-component of the vector.
Y Gets or sets the y-component of the vector.

Properties

Member Description
Item

Constructors

Member Description
Vector2(float, float)
Vector2(float)

Methods

Member Description
static Add(Vector2, Vector2) Adds two vectors.
static Add(ref Vector2, ref Vector2, out Vector2) Adds two vectors.
static Barycentric(Vector2, Vector2, Vector2, float, float) Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
static Barycentric(ref Vector2, ref Vector2, ref Vector2, float, float, out Vector2) Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
static CatmullRom(Vector2, Vector2, Vector2, Vector2, float) Performs a Catmull-Rom interpolation using the specified positions.
static CatmullRom(ref Vector2, ref Vector2, ref Vector2, ref Vector2, float, out Vector2) Performs a Catmull-Rom interpolation using the specified positions.
static Clamp(Vector2, Vector2, Vector2) Restricts a value to be within a specified range.
static Clamp(ref Vector2, ref Vector2, ref Vector2, out Vector2) Restricts a value to be within a specified range.
static ClampToSphere(Vector2, float)
static ClampToSphere(ref Vector2, float)
static Distance(Vector2, Vector2) Calculates the distance between two vectors.
static Distance(ref Vector2, ref Vector2, out float) Calculates the distance between two vectors.
static DistanceSquared(Vector2, Vector2) Calculates the distance between two vectors squared.
static DistanceSquared(ref Vector2, ref Vector2, out float) Calculates the distance between two vectors squared.
static Divide(Vector2, Vector2) Divides the components of a vector by the components of another vector.
static Divide(ref Vector2, ref Vector2, out Vector2) Divides the components of a vector by the components of another vector.
static Divide(Vector2, float) Divides a vector by a scalar value.
static Divide(ref Vector2, float, out Vector2) Divides a vector by a scalar value.
static Dot(Vector2, Vector2) 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.
static Dot(ref Vector2, ref Vector2, out float) 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.
static Floor(Vector2)
static Hermite(Vector2, Vector2, Vector2, Vector2, float) Performs a Hermite spline interpolation.
static Hermite(ref Vector2, ref Vector2, ref Vector2, ref Vector2, float, out Vector2) Performs a Hermite spline interpolation.
static IsZero(ref Vector2)
static IsZero(ref Vector2, float)
static IsZero(Vector2, float)
static Lerp(Vector2, Vector2, float) Performs a linear interpolation between two vectors.
static Lerp(ref Vector2, ref Vector2, float, out Vector2) Performs a linear interpolation between two vectors.
static Max(Vector2, Vector2) Returns a vector that contains the highest value from each matching pair of components.
static Max(ref Vector2, ref Vector2, out Vector2) Returns a vector that contains the highest value from each matching pair of components.
static Min(Vector2, Vector2) Returns a vector that contains the lowest value from each matching pair of components.
static Min(ref Vector2, ref Vector2, out Vector2) Returns a vector that contains the lowest value from each matching pair of components.
static Multiply(Vector2, Vector2) Multiplies the components of two vectors by each other.
static Multiply(ref Vector2, ref Vector2, out Vector2) Multiplies the components of two vectors by each other.
static Multiply(Vector2, float) Multiplies a vector by a scalar value.
static Multiply(ref Vector2, float, out Vector2) Multiplies a vector by a scalar value.
static Negate(Vector2) Returns a vector pointing in the opposite direction.
static Negate(ref Vector2, out Vector2) Returns a vector pointing in the opposite direction.
static Normalize(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.
static Normalize(ref Vector2, out Vector2) 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.
static Reflect(Vector2, Vector2) Determines the reflect vector of the given vector and normal.
static Reflect(ref Vector2, ref Vector2, out Vector2) Determines the reflect vector of the given vector and normal.
static SignNonZero(Vector2)
static SmoothStep(Vector2, Vector2, float) Interpolates between two values using a cubic equation.
static SmoothStep(ref Vector2, ref Vector2, float, out Vector2) Interpolates between two values using a cubic equation.
static Subtract(Vector2, Vector2) Subtracts a vector from a vector.
static Subtract(ref Vector2, ref Vector2, out Vector2) Subtracts a vector from a vector.
static Transform(Vector2, Matrix) Transforms the vector (x, y, 0, 1) by the specified matrix.
static Transform(ref Vector2, ref Matrix, out Vector2) Transforms a Vector2 by the given Matrix.
static Transform(Vector2, Quaternion) Transforms a single Vector2, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.
static Transform(ref Vector2, ref Quaternion, out Vector2) Transforms a Vector2, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.
static Transform(Vector2[], ref Matrix, Vector2[]) Transforms an array of Vector2s by a specified Matrix.
static Transform(Vector2[], int, ref Matrix, Vector2[], int, int) 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.
static Transform(Vector2[], ref Quaternion, Vector2[]) Transforms an array of Vector2s by a specified Quaternion.
static Transform(Vector2[], int, ref Quaternion, Vector2[], int, int) 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.
static TransformNormal(Vector2, Matrix) Transforms a 2D vector normal by a matrix.
static TransformNormal(ref Vector2, ref Matrix, out Vector2) Transforms a vector normal by a matrix.
static TransformNormal(Vector2[], ref Matrix, Vector2[]) Transforms an array of Vector2 vector normals by a specified Matrix.
static TransformNormal(Vector2[], int, ref Matrix, Vector2[], int, int) 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.
AssertIsValid()
Between(ref Vector2, ref Vector2)
Equals(Vector2) Determines whether the specified Object is equal to the Vector2.
Equals(object) Returns a value that indicates whether the current instance is equal to a specified object.
GetHashCode() Gets the hash code of the vector object.
IsValid()
Length() Calculates the length of the vector.
LengthSquared() Calculates the length of the vector squared.
Normalize() 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.
Rotate(double)
ToString() Retrieves a string representation of the current object.

Implements: