Vector |
public struct VectorD2D : IEquatable<VectorD2D>
The VectorD2D type exposes the following members.
| Name | Description | |
|---|---|---|
| Empty | Gets an empty vector (0,0). | |
| IsEmpty | Gets a value indicating whether this instance is empty, i.e. all elements are zero. | |
| Length | Gets the length of the vector. | |
| Normalized | Gets the normalized version of this vector (length 1). | |
| SquareOfLength | Gets the squared length of the vector. | |
| X | Gets the x component of this vector. | |
| Y | Gets the y component of this vector. |
| Name | Description | |
|---|---|---|
| AngleBetweenInRadians | Calculates the angle between two vectors in radians. | |
| CreateNormalized(VectorD2D) | Creates a normalized version of the given vector. | |
| CreateNormalized(Double, Double) | Creates a normalized vector from the given x and y components. | |
| CreateScaled | Creates a scaled version of the given vector. | |
| CreateSum | Creates a vector that is the sum of two vectors. | |
| DotProduct | Calculates the dot product of two vectors. | |
| Equals(Object) | Indicates whether this instance and a specified object are equal. (Overrides ValueTypeEquals(Object)) | |
| Equals(VectorD2D) | Indicates whether the current object is equal to another object of the same type. | |
| GetHashCode | Returns the hash code for this instance. (Overrides ValueTypeGetHashCode) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| MultiplicationElementwise | Multiplies two vectors elementwise. | |
| ToString | Returns the fully qualified type name of this instance. (Overrides ValueTypeToString) | |
| WithX | Returns a new instance with X set to the provided value. | |
| WithY | Returns a new instance with Y set to the provided value. |
| Name | Description | |
|---|---|---|
| Addition(VectorD2D, VectorD2D) | Adds two vectors component-wise. | |
| Division(VectorD2D, Double) | Divides a vector by a scalar. | |
| Equality(VectorD2D, VectorD2D) | Checks if two vectors are equal. | |
| (PointD2D to VectorD2D) | Converts a PointD2D to a VectorD2D. | |
| Inequality(VectorD2D, VectorD2D) | Checks if two vectors are not equal. | |
| Multiply(Double, VectorD2D) | Multiplies a scalar by a vector. | |
| Multiply(VectorD2D, Double) | Multiplies a vector by a scalar. | |
| Subtraction(VectorD2D, VectorD2D) | Subtracts two vectors component-wise. | |
| UnaryNegation(VectorD2D) | Negates a vector. |