Click or drag to resize

Vector2D Methods

The Vector2D type exposes the following members.

Methods
  NameDescription
Public methodAdd(Vector2D)
Adds the specified vector to the current one.
Public methodStatic memberAdd(Vector2D, Vector2D)
Adds two vectors.
Public methodAngle(Vector2D)
Returns the angle (in degrees) between the current and the specified vector.
Public methodStatic memberAngle(Vector2D, Vector2D)
Returns the angle (in degrees) between two vectors.
Public methodDistance(Vector2D)
Returns the distance between the current vector and the specified vector.
Public methodStatic memberDistance(Vector2D, Vector2D)
Returns the distance between two vectors.
Public methodDivide(Single)
Divides the current vector by the specified number.
Public methodStatic memberDivide(Vector2D, Single)
Divides a vector by a number.
Public methodStatic memberDot
Returns the dot product of two vectors.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberEquals(Vector2D, Vector2D)
Specifies whether two vectors are approximately equal.
Public methodGetHashCode
Returns the hash code of the current object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodLerp(Vector2D, Single)
Linearly interpolates between the current and the specified vector by t.
Public methodStatic memberLerp(Vector2D, Vector2D, Single)
Linearly interpolates between two vectors by t.
Public methodStatic memberMax
Returns the vector with the maximum length.
Public methodStatic memberMin
Returns the vector with the minimum length.
Public methodMultiply(Single)
Multiplies the specified vector with the specified number.
Public methodStatic memberMultiply(Single, Vector2D)
Multiplies a vector by a number.
Public methodStatic memberMultiply(Vector2D, Single)
Multiplies a vector by a number.
Public methodNegate
Negates every component of the current vector.
Public methodStatic memberNegate(Vector2D)
Negates every component of the specified vector.
Public methodNormalize
Makes the current vector have a magnitude of 1.
Public methodStatic memberNormalize(Vector2D)
Makes the specified vector have a magnitude of 1.
Public methodSet
Sets the X and Y components of the current vector.
Public methodSubtract(Vector2D)
Subtracts the specified vector from the current one.
Public methodStatic memberSubtract(Vector2D, Vector2D)
Subtracts the second vector from the first vector.
Public methodToString
Returns a string representation of the current object.
(Overrides ValueTypeToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodToStringDetailed
Displays the current vector as a detailed string.
(Defined by UnityExtensions.)
Top
See Also