﻿Vector2D Methods  # Vector2D Methods

The Vector2D type exposes the following members. Methods
NameDescription Add(Vector2D)
Adds the specified vector to the current one.  Add(Vector2D, Vector2D) Angle(Vector2D)
Returns the angle (in degrees) between the current and the specified vector.  Angle(Vector2D, Vector2D)
Returns the angle (in degrees) between two vectors. Distance(Vector2D)
Returns the distance between the current vector and the specified vector.  Distance(Vector2D, Vector2D)
Returns the distance between two vectors. Divide(Single)
Divides the current vector by the specified number.  Divide(Vector2D, Single)
Divides a vector by a number.  Dot
Returns the dot product of two vectors. Equals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ValueTypeEquals(Object).)  Equals(Vector2D, Vector2D)
Specifies whether two vectors are approximately equal. GetHashCode
Returns the hash code of the current object.
(Overrides ValueTypeGetHashCode.) GetType (Inherited from Object.) Lerp(Vector2D, Single)
Linearly interpolates between the current and the specified vector by t.  Lerp(Vector2D, Vector2D, Single)
Linearly interpolates between two vectors by t.  Max
Returns the vector with the maximum length.  Min
Returns the vector with the minimum length. Multiply(Single)
Multiplies the specified vector with the specified number.  Multiply(Single, Vector2D)
Multiplies a vector by a number.  Multiply(Vector2D, Single)
Multiplies a vector by a number. Negate
Negates every component of the current vector.  Negate(Vector2D)
Negates every component of the specified vector. Normalize
Makes the current vector have a magnitude of 1.  Normalize(Vector2D)
Makes the specified vector have a magnitude of 1. Set
Sets the X and Y components of the current vector. Subtract(Vector2D)
Subtracts the specified vector from the current one.  Subtract(Vector2D, Vector2D)
Subtracts the second vector from the first vector. ToString
Returns a string representation of the current object.
(Overrides ValueTypeToString.)
Top Extension Methods
NameDescription ToStringDetailed
Displays the current vector as a detailed string.
(Defined by UnityExtensions.)
Top See Also