This repository was archived by the owner on Dec 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
VRageMath.Vector2D
Malware edited this page Dec 21, 2018
·
52 revisions
← Index
Namespace: VRageMath
Assembly: VRage.Math.dll
Defines a vector with two components.
_double X_ |
Gets or sets the x-component of the vector. |
_double Y_ |
Gets or sets the y-component of the vector. |
static _Vector2D Zero_ |
|
static _Vector2D One_ |
|
static _Vector2D UnitX_ |
|
static _Vector2D UnitY_ |
|
static _Vector2D PositiveInfinity_ |
_double Item_ |
_string ToString()_ |
Retrieves a string representation of the current object. |
_bool Equals(Vector2D other)_ |
Determines whether the specified Object is equal to the Vector2D. |
_bool Equals(Object obj)_ |
Returns a value that indicates whether the current instance is equal to a specified object. |
_int GetHashCode()_ |
Gets the hash code of the vector object. |
_bool IsValid()_ |
|
_void AssertIsValid()_ |
|
_double Length()_ |
Calculates the length of the vector. |
_double LengthSquared()_ |
Calculates the length of the vector squared. |
static _double Distance(Vector2D value1, Vector2D value2)_ |
Calculates the distance between two vectors. |
static _void Distance(ref Vector2D value1, ref Vector2D value2, ref 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, ref double result)_ |
Calculates the distance between two vectors squared. |
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, ref 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. |
_void 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. |
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, ref 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, ref Vector2D result)_ |
Determines the reflect vector of the given vector and normal. |
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, ref Vector2D result)_ |
Returns a vector that contains the lowest value from each matching pair of components. |
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, ref Vector2D result)_ |
Returns a vector that contains the highest value from each matching pair of components. |
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, ref 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 _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, ref Vector2D result)_ |
Performs a linear interpolation between two vectors. |
static _Vector2D Barycentric(Vector2D value1, Vector2D value2, Vector2D value3, double amount1, double amount2)_ |
Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle. |
static _void Barycentric(ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, double amount1, double amount2, ref Vector2D result)_ |
Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle. |
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, ref Vector2D result)_ |
Interpolates between two values using a cubic equation. |
static _Vector2D CatmullRom(Vector2D value1, Vector2D value2, Vector2D value3, Vector2D value4, double amount)_ |
Performs a Catmull-Rom interpolation using the specified positions. |
static _void CatmullRom(ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, ref Vector2D value4, double amount, ref Vector2D result)_ |
Performs a Catmull-Rom interpolation using the specified positions. |
static _Vector2D Hermite(Vector2D value1, Vector2D tangent1, Vector2D value2, Vector2D tangent2, double amount)_ |
Performs a Hermite spline interpolation. |
static _void Hermite(ref Vector2D value1, ref Vector2D tangent1, ref Vector2D value2, ref Vector2D tangent2, double amount, ref Vector2D result)_ |
Performs a Hermite spline interpolation. |
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, ref Vector2D result)_ |
Transforms a Vector2D by the given Matrix. |
static _Vector2D TransformNormal(Vector2D normal, Matrix matrix)_ |
Transforms a 2D vector normal by a matrix. |
static _void TransformNormal(ref Vector2D normal, ref Matrix matrix, ref Vector2D result)_ |
Transforms a vector normal by a 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, ref 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. |
static _void Transform(Vector2D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector2D[] destinationArray, int destinationIndex, int length)_ |
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 _void TransformNormal(Vector2D[] sourceArray, ref Matrix matrix, Vector2D[] destinationArray)_ |
Transforms an array of Vector2D vector normals by a specified Matrix. |
static _void TransformNormal(Vector2D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector2D[] destinationArray, int destinationIndex, int length)_ |
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. |
static _void Transform(Vector2D[] sourceArray, ref Quaternion rotation, Vector2D[] destinationArray)_ |
Transforms an array of Vector2s by a specified Quaternion. |
static _void Transform(Vector2D[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector2D[] destinationArray, int destinationIndex, int length)_ |
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 Negate(Vector2D value)_ |
Returns a vector pointing in the opposite direction. |
static _void Negate(ref Vector2D value, ref Vector2D result)_ |
Returns a vector pointing in the opposite direction. |
static _Vector2D Add(Vector2D value1, Vector2D value2)_ |
Adds two vectors. |
static _void Add(ref Vector2D value1, ref Vector2D value2, ref Vector2D result)_ |
Adds two vectors. |
static _Vector2D Subtract(Vector2D value1, Vector2D value2)_ |
Subtracts a vector from a vector. |
static _void Subtract(ref Vector2D value1, ref Vector2D value2, ref Vector2D result)_ |
Subtracts a vector from a vector. |
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, ref 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, ref Vector2D result)_ |
Multiplies a vector by a scalar value. |
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, ref 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, ref Vector2D result)_ |
Divides a vector by a scalar value. |
_bool Between(ref Vector2D start, ref Vector2D end)_ |
|
static _Vector2D Floor(Vector2D position)_ |
|
_void Rotate(double angle)_ |
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!