-
Notifications
You must be signed in to change notification settings - Fork 124
VRageMath.Vector2D
← Index ← Namespace Index
public struct Vector2D: IEquatable<Vector2D>
Defines a vector with two components.
Namespace: VRageMath
Assembly: VRage.Math.dll
Implements:
static Vector2D PositiveInfinity
Gets or sets the x-component of the vector.
Gets or sets the y-component of the vector.
static Vector2D Add(Vector2D value1, Vector2D value2)
Adds two vectors.
static void Add(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Adds two vectors.
Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.
Performs a Catmull-Rom interpolation using the specified positions.
Performs a Catmull-Rom interpolation using the specified positions.
static Vector2D Clamp(Vector2D value1, Vector2D min, Vector2D max)
Restricts a value to be within a specified range.
static void Clamp(ref Vector2D value1, ref Vector2D min, ref Vector2D max, out Vector2D result)
Restricts a value to be within a specified range.
static Vector2D ClampToSphere(Vector2D vector, double radius)
static void ClampToSphere(ref Vector2D vector, double radius)
static double Distance(Vector2D value1, Vector2D value2)
Calculates the distance between two vectors.
static void Distance(ref Vector2D value1, ref Vector2D value2, out double result)
Calculates the distance between two vectors.
static double DistanceSquared(Vector2D value1, Vector2D value2)
Calculates the distance between two vectors squared.
static void DistanceSquared(ref Vector2D value1, ref Vector2D value2, out double result)
Calculates the distance between two vectors squared.
static Vector2D Divide(Vector2D value1, Vector2D value2)
Divides the components of a vector by the components of another vector.
static void Divide(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Divides the components of a vector by the components of another vector.
static Vector2D Divide(Vector2D value1, double divider)
Divides a vector by a scalar value.
static void Divide(ref Vector2D value1, double divider, out Vector2D result)
Divides a vector by a scalar value.
static double Dot(Vector2D value1, Vector2D value2)
Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a doubleing 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 void Dot(ref Vector2D value1, ref Vector2D value2, out double result)
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 doubleing 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 Vector2D Floor(Vector2D position)
Performs a Hermite spline interpolation.
Performs a Hermite spline interpolation.
static Vector2D Lerp(Vector2D value1, Vector2D value2, double amount)
Performs a linear interpolation between two vectors.
static void Lerp(ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
Performs a linear interpolation between two vectors.
static Vector2D Max(Vector2D value1, Vector2D value2)
Returns a vector that contains the highest value from each matching pair of components.
static void Max(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Returns a vector that contains the highest value from each matching pair of components.
static Vector2D Min(Vector2D value1, Vector2D value2)
Returns a vector that contains the lowest value from each matching pair of components.
static void Min(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Returns a vector that contains the lowest value from each matching pair of components.
static Vector2D Multiply(Vector2D value1, Vector2D value2)
Multiplies the components of two vectors by each other.
static void Multiply(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Multiplies the components of two vectors by each other.
static Vector2D Multiply(Vector2D value1, double scaleFactor)
Multiplies a vector by a scalar value.
static void Multiply(ref Vector2D value1, double scaleFactor, out Vector2D result)
Multiplies a vector by a scalar value.
static Vector2D Negate(Vector2D value)
Returns a vector pointing in the opposite direction.
static void Negate(ref Vector2D value, out Vector2D result)
Returns a vector pointing in the opposite direction.
static Vector2D Normalize(Vector2D value)
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 void Normalize(ref Vector2D value, out Vector2D result)
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 Vector2D Reflect(Vector2D vector, Vector2D normal)
Determines the reflect vector of the given vector and normal.
static void Reflect(ref Vector2D vector, ref Vector2D normal, out Vector2D result)
Determines the reflect vector of the given vector and normal.
static Vector2D SmoothStep(Vector2D value1, Vector2D value2, double amount)
Interpolates between two values using a cubic equation.
static void SmoothStep(ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
Interpolates between two values using a cubic equation.
static Vector2D Subtract(Vector2D value1, Vector2D value2)
Subtracts a vector from a vector.
static void Subtract(ref Vector2D value1, ref Vector2D value2, out Vector2D result)
Subtracts a vector from a vector.
static Vector2D Transform(Vector2D position, Matrix matrix)
Transforms the vector (x, y, 0, 1) by the specified matrix.
static void Transform(ref Vector2D position, ref Matrix matrix, out Vector2D result)
Transforms a Vector2D by the given Matrix.
static Vector2D Transform(Vector2D value, Quaternion rotation)
Transforms a single Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.
static void Transform(ref Vector2D value, ref Quaternion rotation, out Vector2D result)
Transforms a Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.
static void Transform(Vector2D[] sourceArray, ref Matrix matrix, Vector2D[] destinationArray)
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 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.
static Vector2D TransformNormal(Vector2D normal, Matrix matrix)
Transforms a 2D vector normal by a matrix.
static void TransformNormal(ref Vector2D normal, ref Matrix matrix, out Vector2D result)
Transforms a vector normal by a matrix.
Transforms an array of Vector2D vector normals by a specified Matrix.
Transforms a specified range in an array of Vector2D vector normals by a specified Matrix and places the results in a specified range in a destination array.
bool Between(ref Vector2D start, ref Vector2D end)
Determines whether the specified Object is equal to the Vector2D.
Returns a value that indicates whether the current instance is equal to a specified object.
Gets the hash code of the vector object.
Calculates the length of the vector.
Calculates the length of the vector squared.
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.
Retrieves a string representation of the current object.
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!