The Vector2 type exposes the following members.
Back to Top
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
Vector2(Point) |
Initializes a new instance of the Vector2 class.
| |
Vector2(Single, Single) |
Initializes a new instance of the Vector2 class.
|
Methods
Name | Description | |
---|---|---|
Distance |
Compute the distance between two vectors.
| |
Dot |
Compute the dot product of two vectors.
| |
Equals |
Determines whether the specified System.Object is equal to the Vector.
(Overrides ValueType Equals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAngle |
Get the angle between two vectors.
| |
GetHashCode |
Gets the hash code of this object.
(Overrides ValueType GetHashCode .) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Length |
Get the length of the vector.
| |
Load |
Deserialize a vector.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Normalize |
Normalize the vector.
| |
Normalize(Vector2) |
Normalize a vector.
| |
Save |
Serialize a vector.
| |
ToPoint |
Convert the vector to a Point object.
| |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Operators
Name | Description | |
---|---|---|
Addition |
Add two vectors.
| |
Equality |
Compares a vector for equality with another vector.
| |
Inequality |
Compares a vector for inequality with another vector.
| |
Multiply |
Scale a Vector2 by a scalar.
| |
Subtraction |
Subtract two vectors.
| |
UnaryNegation |
Negate a Vector2.
|
Fields
Name | Description | |
---|---|---|
X |
The X vector component.
| |
Y |
The Y vector component.
| |
Zero |
Gets a Vector2 object with X and Y components.
|
See Also