Property | Type | Description | |
---|---|---|---|
x | Real |
Method | Description | |
---|---|---|
Add ( Vector2 left, Vector2 right ) : Vector2 |
Used when a Vector2 is added to another Vector2.
|
|
Cross ( Vector2 vector ) : Real |
Calculates the 2 dimensional cross-product of 2 vectors, which results in a Real value which is 2 times the area of the triangle defined by the two vectors. It also is the magnitude of the 3D vector that is perpendicular to the 2D vectors if the 2D vectors are projected to 3D space.
|
|
Dot ( Vector2 vector ) : Real |
Calculates the 2 dimensional dot-product of 2 vectors, which is equal to the cosine of the angle between the vectors, times the lengths of each of the vectors. A.Dot(B) == |A| * |B| * cos(fi)
|
|
Equals ( object obj ) : bool | ||
GetHashCode ( ) : int | ||
Multiply ( Real scalar, Vector2 right ) : Vector2 |
Used when a scalar value is multiplied by a Vector2.
|
|
Multiply ( Vector2 left, Real scalar ) : Vector2 |
Used when a Vector2 is multiplied by a scalar value.
|
|
Negate ( Vector2 left ) : Vector2 |
Used to negate the elements of a vector.
|
|
Normalize ( ) : Real |
Normalizes the vector. This method normalises the vector such that it's length / magnitude is 1. The result is called a unit vector. This function will not crash for zero-sized vectors, but there will be no changes made to their components. |
|
Parse ( string s ) : Vector2 | ||
Subtract ( Vector2 left, Vector2 right ) : Vector2 |
Used to subtract a Vector2 from another Vector2.
|
|
ToNormalized ( ) : Vector2 |
Gets a normalized (unit length) vector of this vector
|
|
ToString ( ) : string | ||
Vector2 ( Real x, Real y ) : System |
Constructor.
|
|
operator ( ) : Vector2 |
Used when a Vector2 is added to another Vector2.
|
|
operator ( ) : bool |
public static Add ( Vector2 left, Vector2 right ) : Vector2 | ||
left | Vector2 | |
right | Vector2 | |
return | Vector2 |
public static Multiply ( Real scalar, Vector2 right ) : Vector2 | ||
scalar | Real | |
right | Vector2 | |
return | Vector2 |
public static Multiply ( Vector2 left, Real scalar ) : Vector2 | ||
left | Vector2 | |
scalar | Real | |
return | Vector2 |
public static Negate ( Vector2 left ) : Vector2 | ||
left | Vector2 | |
return | Vector2 |
public static Subtract ( Vector2 left, Vector2 right ) : Vector2 | ||
left | Vector2 | |
right | Vector2 | |
return | Vector2 |
public Vector2 ( Real x, Real y ) : System | ||
x | Real | X position. |
y | Real | Y position |
return | System |