|
|
The Vector2D type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
|
|
Vector2D()()()() |
Create a zero vector
|
|
|
Vector2D(Double, Double) |
Create a vector from X and Y components
|
Methods
| Name | Description | |
|---|---|---|
|
|
Add(Double) |
Adds a value to every X, Y and Z coordinate in the Vector and returns a new Vector with the result
|
|
|
Add(Point2D) |
Translates a point by this vector and returns the resulting point
|
|
|
Add(Vector2D) |
Adds another vector to this to produce a new vector
|
|
|
Angle |
Returns the angle between this vector and another vector in the range [0, PI]
|
|
|
AngleWithReference |
Returns the angle between this vector and another vector in the range [-PI, PI], using a reference vector to determine the sign of the angle
|
|
|
Cross |
Returns the cross product between this vector and another
|
|
|
DirectionEquals(Vector2D) |
Compare direction of vectors using a tolerance
|
|
|
DirectionEquals(Vector2D, Double) |
Compare direction of vectors using a tolerance
|
|
|
Dispose()()()() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from NativeHandle.) |
|
|
Dispose(Boolean) | (Inherited from NativeHandle.) |
|
|
Divide(Double) |
Divides every X, Y and Z coordinate in the Vector by a value and returns a new Vector with the result
|
|
|
Divide(Vector2D) |
Divides this vector by another to produce a new vector
|
|
|
Dot |
Returns the dot product between this vector and another
|
|
|
Equals | (Overrides NativeHandle..::..Equals(Object).) |
|
|
Finalize |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from NativeHandle.) |
|
|
GetHashCode | (Overrides NativeHandle..::..GetHashCode()()()().) |
|
|
GetType |
Gets the Type of the current instance. (Inherited from Object.) |
|
|
Invert |
Returns an inverted version of this vector (all components inverted)
|
|
|
MemberwiseClone |
Creates a shallow copy of the current Object. (Inherited from Object.) |
|
|
Multiply(Double) |
Multiplies every X, Y and Z coordinate in the Vector by a value and returns a new Vector with the result
|
|
|
Multiply(Vector2D) |
Multiplies a vector by this to produce a new vector
|
|
|
Negate |
Returns a negated version of this vector (all components negated)
|
|
|
Normalize |
Returns a normalized version of this vector (magnitude of 1)
|
|
|
Subtract(Double) |
Subtracts a value from every X, Y and Z coordinate in the Vector and returns a new Vector with the result
|
|
|
Subtract(Vector2D) |
Subtracts a vector from this to produce a new vector
|
|
|
TolerantEquals(Vector2D) |
Compare vectors using a tolerance
|
|
|
TolerantEquals(Vector2D, Vector2D) |
Compare vectors using a tolerance
|
|
|
TolerantEquals(Vector2D, Double) |
Compare vectors using a tolerance
|
|
|
TolerantEquals(Vector2D, Vector2D, Double) |
Compare vectors using a tolerance
|
|
|
ToPoint2D |
Convert vector to a point (equivalent to point from adding vector to origin)
|
|
|
ToString | (Overrides NativeHandle..::..ToString()()()().) |
Operators
| Name | Description | |
|---|---|---|
|
|
Addition(Double, Vector2D) |
Adds a value to every X, Y and Z coordinate in the Vector and returns a new Vector with the result
|
|
|
Addition(Vector2D, Vector2D) |
Adds two vectors to produce a new vector
|
|
|
Addition(Vector2D, Double) |
Adds a value to every X, Y and Z coordinate in the Vector and returns a new Vector with the result
|
|
|
Division(Vector2D, Vector2D) |
Divides two vectors to produce a new vector
|
|
|
Division(Vector2D, Double) |
Divides every X, Y and Z coordinate in the Vector by a value and returns a new Vector with the result
|
|
|
Multiply(Double, Vector2D) |
Multiplies every X, Y and Z coordinate in the Vector by a value and returns a new Vector with the result
|
|
|
Multiply(Vector2D, Vector2D) |
Multiplies two vectors to produce a new vector
|
|
|
Multiply(Vector2D, Double) |
Multiplies every X, Y and Z coordinate in the Vector by a value and returns a new Vector with the result
|
|
|
Subtraction(Vector2D, Vector2D) |
Subtracts two vectors to produce a new vector
|
|
|
Subtraction(Vector2D, Double) |
Subtracts a value from every X, Y and Z coordinate in the Vector and returns a new Vector with the result
|
Properties
| Name | Description | |
|---|---|---|
|
|
IsDisposed |
Gets a value indicating whether the object has been disposed and is no longer available.
(Inherited from NativeHandle.) |
|
|
IsReadOnly | (Overrides NativeHandle..::..IsReadOnly.) |
|
|
IsZero |
Is this a zero vector (all components are zero) ?
|
|
|
Item | |
|
|
Length |
Magnitude of vector
|
|
|
LengthSquared |
Magnitude of vector squared
|
|
|
UnitX |
Returns a unit vector in the X direction (1,0)
|
|
|
UnitY |
Returns a unit vector in the Y direction (0,1)
|
|
|
X |
Returns the X component of the vector
|
|
|
Y |
Returns the Y component of the vector
|
|
|
Zero |
Returns a zero vector (0,0)
|