Click or drag to resize

Vector2 Methods

The Vector2 type exposes the following members.

Methods
  NameDescription
Public methodAdd(Vector2)
Add Vector2 to this Vector2
Public methodStatic memberAdd(Vector2, Vector2)
Vector2 addition
Public methodCcw(Vector2)
Cross product of two Vector2s
Public methodStatic memberCcw(Vector2, Vector2)
Cross product of two Vector2s
Public methodCcwD(Vector2)
Cross product of two Vector2s
Public methodStatic memberCcwD(Vector2, Vector2)
Cross product of two Vector2s
Public methodDot(Vector2)
Dot product of two Vector2s
Public methodStatic memberDot(Vector2, Vector2)
Dot product of two Vector2s
Public methodDotD(Vector2)
Dot product of two Vector2s
Public methodStatic memberDotD(Vector2, Vector2)
Dot product of two Vector2s
Public methodEquals(Object)
Vector2 exact equality - see EQ(Vector2, Vector2) for alternative
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector2)
Vector2 exact equality - see EQ(Vector2, Vector2) for alternative
Public methodGetHashCode
Returns the hash code for the current Vector2.
(Overrides ValueTypeGetHashCode.)
Public methodLength
Length of Vector2
Public methodStatic memberLength(Vector2)
Length of Vector2
Public methodLengthD
Length of Vector2
Public methodStatic memberLengthD(Vector2)
Length of Vector2
Public methodLengthSq
Length squared of Vector2
Public methodStatic memberLengthSq(Vector2)
Length squared of Vector3
Public methodLengthSqD
Length squared of Vector2
Public methodStatic memberLengthSqD(Vector2)
Length squared of Vector3
Public methodLerp(Vector2, Double)
Linear interpolation between this Vector2 and another Vector2

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns this. When t = 1 returns b. When t = 0.5 returns the point midway between this and b.

Public methodStatic memberLerp(Vector2, Vector2, Double)
Linear interpolation between two Vector2s

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

Public methodStatic memberLerp(Vector2, Vector2, Single)
Linear interpolation between two Vector2s

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

Public methodMaximize(Vector2)
Vector2 maximization - combination of the largest components
Public methodStatic memberMaximize(Vector2, Vector2)
Vector2 maximization - combination of the largest components
Public methodMinimize(Vector2)
Vector2 minimization - combination of the smallest components
Public methodStatic memberMinimize(Vector2, Vector2)
Vector2 minimization - combination of the smallest components
Public methodMultiply(Double)
Scale the X, and Y components of Vector2
Public methodMultiply(Single)
Scale the X, and Y components of Vector2
Public methodMultiply(Vector2)
Scale the X and Y components of Vector2.
Public methodStatic memberMultiply(Vector2, Vector2)
Scale the X and Y components of Vector2 .
Public methodStatic memberMultiply(Vector2, Double)
Scale the X and Y components of Vector2
Public methodStatic memberMultiply(Vector2, Single)
Scale the X and Y components of Vector2
Public methodStatic memberMultiplyAdd
Combined multiplication and addition
Public methodNegate
Vector2 in-place negation.
Public methodNormalize
Vector2 normalization - make its length be 1
Public methodStatic memberNormalize(Vector2)
Vector2 normalization - make its length be 1
Public methodScale(Double)
Scale the X and Y components of Vector2
Public methodScale(Single)
Scale the X and Y components of Vector2
Public methodScale(Vector2)
Scale the X and Y components of Vector2.
Public methodStatic memberScale(Vector2, Vector2)
Scale the X and Y components of Vector2 .
Public methodStatic memberScale(Vector2, Double)
Scale the X and Y components of Vector2
Public methodStatic memberScale(Vector2, Single)
Scale the X and Y components of Vector2
Public methodSubtract(Vector2)
Vector2 subtraction
Public methodStatic memberSubtract(Vector2, Vector2)
Vector2 subtraction
Public methodToString
Returns a string that represents the current Vector2.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform
Transforms a Vector2 by the given Matrix
Public methodTransformCoordinate(Matrix)
Transform this Vector2 coordinate by Matrix
Public methodStatic memberTransformCoordinate(Vector2, Matrix)
Transform Vector2 coordinate by Matrix
Public methodTransformNormal(Matrix)
Transform this Vector2 normal by Matrix
Public methodTransformNormal(Quaternion)
Transform this Vector2 normal by Quaternion
Public methodStatic memberTransformNormal(Vector2, Matrix)
Transform Vector2 normal by Matrix
Public methodStatic memberTransformNormal(Vector2, Quaternion)
Transform Vector2 normal by Quaternion
Top
See Also