Click or drag to resize

Vector2 Methods

The Vector2 type exposes the following members.

Methods
 NameDescription
Public methodStatic memberAdd(Vector2, Vector2) Performs vector addition on value1 and value2.
Public methodStatic memberAdd(Vector2, Vector2, Vector2) Performs vector addition on value1 and value2, storing the result of the addition in result.
Public methodStatic memberBarycentric(Vector2, Vector2, Vector2, Double, Double) Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.
Public methodStatic memberBarycentric(Vector2, Vector2, Vector2, Double, Double, Vector2) Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Double) Creates a new Vector2 that contains CatmullRom interpolation of the specified vectors.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains CatmullRom interpolation of the specified vectors.
Public methodStatic memberClamp(Vector2, Vector2, Vector2) Clamps the specified value within a range.
Public methodStatic memberClamp(Vector2, Vector2, Vector2, Vector2) Clamps the specified value within a range.
Public methodStatic memberDistance(Vector2, Vector2) Returns the distance between two vectors.
Public methodStatic memberDistance(Vector2, Vector2, Double) Returns the distance between two vectors.
Public methodStatic memberDistanceSquared(Vector2, Vector2) Returns the squared distance between two vectors.
Public methodStatic memberDistanceSquared(Vector2, Vector2, Double) Returns the squared distance between two vectors.
Public methodStatic memberDivide(Vector2, Vector2) Divides the components of a Vector2 by the components of another Vector2.
Public methodStatic memberDivide(Vector2, Double) Divides the components of a Vector2 by a scalar.
Public methodStatic memberDivide(Vector2, Vector2, Vector2) Divides the components of a Vector2 by the components of another Vector2.
Public methodStatic memberDivide(Vector2, Double, Vector2) Divides the components of a Vector2 by a scalar.
Public methodStatic memberDot(Vector2, Vector2) Returns a dot product of two vectors.
Public methodStatic memberDot(Vector2, Vector2, Double) Returns a dot product of two vectors.
Public methodEquals(Object) Compares whether current instance is equal to specified Object.
(Overrides ValueTypeEquals(Object))
Public methodEquals(Vector2) Compares whether current instance is equal to specified Vector2.
Public methodGetHashCode Gets the hash code of this Vector2.
(Overrides ValueTypeGetHashCode)
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Double) Creates a new Vector2 that contains hermite spline interpolation.
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains hermite spline interpolation.
Public methodLength Returns the length of this Vector2.
Public methodLengthSquared Returns the squared length of this Vector2.
Public methodStatic memberLerp(Vector2, Vector2, Double) Creates a new Vector2 that contains linear interpolation of the specified vectors.
Public methodStatic memberLerp(Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains linear interpolation of the specified vectors.
Public methodStatic memberMax(Vector2, Vector2) Creates a new Vector2 that contains a maximal values from the two vectors.
Public methodStatic memberMax(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a maximal values from the two vectors.
Public methodStatic memberMin(Vector2, Vector2) Creates a new Vector2 that contains a minimal values from the two vectors.
Public methodStatic memberMin(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a minimal values from the two vectors.
Public methodStatic memberMultiply(Vector2, Vector2) Creates a new Vector2 that contains a multiplication of two vectors.
Public methodStatic memberMultiply(Vector2, Double) Creates a new Vector2 that contains a multiplication of Vector2 and a scalar.
Public methodStatic memberMultiply(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a multiplication of two vectors.
Public methodStatic memberMultiply(Vector2, Double, Vector2) Creates a new Vector2 that contains a multiplication of Vector2 and a scalar.
Public methodStatic memberNegate(Vector2) Creates a new Vector2 that contains the specified vector inversion. direction of value.
Public methodStatic memberNegate(Vector2, Vector2) Creates a new Vector2 that contains the specified vector inversion. direction of value in result.
Public methodNormalize Turns this Vector2 to a unit vector with the same direction.
Public methodStatic memberNormalize(Vector2) Creates a new Vector2 that contains a normalized values from another vector.
Public methodStatic memberNormalize(Vector2, Vector2) Creates a new Vector2 that contains a normalized values from another vector.
Public methodStatic memberReflect(Vector2, Vector2) Creates a new Vector2 that contains reflect vector of the given vector and normal.
Public methodStatic memberReflect(Vector2, Vector2, Vector2) Creates a new Vector2 that contains reflect vector of the given vector and normal.
Public methodStatic memberSmoothStep(Vector2, Vector2, Double) Creates a new Vector2 that contains cubic interpolation of the specified vectors.
Public methodStatic memberSmoothStep(Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains cubic interpolation of the specified vectors.
Public methodStatic memberSubtract(Vector2, Vector2) Creates a new Vector2 that contains subtraction of on Vector2 from a another.
Public methodStatic memberSubtract(Vector2, Vector2, Vector2) Creates a new Vector2 that contains subtraction of on Vector2 from a another.
Public methodToString Returns a String representation of this Vector2 in the format: {X:[X] Y:[Y]}
(Overrides ValueTypeToString)
Public methodStatic memberTransform(Vector2, Matrix44) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Matrix44.
Public methodStatic memberTransform(Vector2, Quaternion) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Quaternion, representing the rotation.
Public methodStatic memberTransform(Vector2, Matrix44, Vector2) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Matrix44.
Public methodStatic memberTransform(Vector2, Quaternion, Vector2) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Quaternion, representing the rotation.
Public methodStatic memberTransform(Vector2, Matrix44, Vector2) Apply transformation on all vectors within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransform(Vector2, Quaternion, Vector2) Apply transformation on all vectors within array of Vector2 by the specified Quaternion and places the results in an another array.
Public methodStatic memberTransform(Vector2, Int32, Matrix44, Vector2, Int32, Int32) Apply transformation on vectors within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransform(Vector2, Int32, Quaternion, Vector2, Int32, Int32) Apply transformation on vectors within array of Vector2 by the specified Quaternion and places the results in an another array.
Public methodStatic memberTransformNormal(Vector2, Matrix44) Creates a new Vector2 that contains a transformation of the specified normal by the specified Matrix44.
Public methodStatic memberTransformNormal(Vector2, Matrix44, Vector2) Creates a new Vector2 that contains a transformation of the specified normal by the specified Matrix44.
Public methodStatic memberTransformNormal(Vector2, Matrix44, Vector2) Apply transformation on all normals within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransformNormal(Vector2, Int32, Matrix44, Vector2, Int32, Int32) Apply transformation on normals within array of Vector2 by the specified Matrix44 and places the results in an another array.
Top
See Also