Export (0) Print
Expand All

Vector2 Members

The following tables list the members exposed by the Vector2 type.

NameDescription
Public MethodVector2Overloaded. Initializes a new instance of Vector2.

NameDescription
Public FieldXGets or sets the x-component of the vector.
Public FieldYGets or sets the y-component of the vector.

NameDescription
Public Property StaticOneReturns a Vector2 with both of its components set to one.
Public Property StaticUnitXReturns the unit vector for the x-axis.
Public Property StaticUnitYReturns the unit vector for the y-axis.
Public Property StaticZeroReturns a Vector2 with all of its components set to zero.

NameDescription
Public Method StaticAddOverloaded. Adds two vectors.
Public Method StaticBarycentricOverloaded. Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in 2D barycentric (areal) coordinates.
Public Method StaticCatmullRomOverloaded. Performs a Catmull-Rom interpolation using the specified positions.
Public Method StaticClampOverloaded. Restricts a value to be within a specified range.
Public Method StaticDistanceOverloaded. Calculates the distance between two vectors.
Public Method StaticDistanceSquaredOverloaded. Calculates the distance between two vectors squared.
Public Method StaticDivideOverloaded. Divides a vector by a scalar or another vector.
Public Method StaticDotOverloaded. 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.
Public MethodEqualsOverloaded. Returns a value that indicates whether the current instance is equal to a specified object.
Public MethodGetHashCodeGets the hash code of the vector object.
Public MethodGetType(Inherited from Object.)
Public Method StaticHermiteOverloaded. Performs a Hermite spline interpolation.
Public MethodLengthCalculates the length of the vector.
Public MethodLengthSquaredCalculates the length of the vector squared.
Public Method StaticLerpOverloaded. Performs a linear interpolation between two vectors.
Public Method StaticMaxOverloaded. Returns a vector that contains the highest value from each matching pair of components.
Public Method StaticMinOverloaded. Returns a vector that contains the lowest value from each matching pair of components.
Public Method StaticMultiplyOverloaded. Multiplies a vector by a scalar or another vector.
Public Method StaticNegateOverloaded. Returns a vector pointing in the opposite direction.
Public MethodNormalizeOverloaded. 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.
Public Method Staticop_AdditionAdds two vectors.
Public Method Staticop_DivisionOverloaded. Divide a vector by a scalar or another vector.
Public Method Staticop_EqualityTests vectors for equality.
Public Method Staticop_InequalityTests vectors for inequality.
Public Method Staticop_MultiplyOverloaded. Multiplies a vector by a scalar or another vector.
Public Method Staticop_SubtractionSubtracts a vector from a vector.
Public Method Staticop_UnaryNegationReturns a vector pointing in the opposite direction.
Public Method StaticReflectOverloaded. Determines the reflect vector of the given vector and normal.
Public Method StaticSmoothStepOverloaded. Interpolates between two values using a cubic equation.
Public Method StaticSubtractOverloaded. Subtracts a vector from a vector.
Public MethodToStringRetrieves a string representation of the current object.
Public Method StaticTransformOverloaded. Transforms one or more Vector2s by a Matrix or Quaternion.
Public Method StaticTransformNormalOverloaded. Transforms a vector normal or array of vector normals by a matrix.

NameDescription
Protected MethodFinalize(Inherited from Object.)
Protected MethodMemberwiseClone(Inherited from Object.)

Community Additions

ADD
Show:
© 2014 Microsoft