Property | Type | Description | |
---|---|---|---|
Down | Vector2 | ||
Left | Vector2 | ||
Null | Vector2 | ||
Right | Vector2 | ||
Up | Vector2 | ||
X | double | ||
Y | double |
Method | Description | |
---|---|---|
Dot ( Vector2 a, Vector2 b ) : double |
Gives the dot product of two vectors.
|
|
IsNullVector ( ) : bool |
Checks whether the vector is a null vector.
|
|
IsNullVector ( Vector2 vector ) : bool |
Checks whether a vector is a null vector.
|
|
IsNullVector ( double tolerance ) : bool |
Checks whether the vector is considered a null vector.
|
|
Norm ( ) : double |
Gets the euclidean norm.
|
|
Norm ( Vector2 vector ) : double |
Gets the euclidean norm of the specified vector.
|
|
NormSquared ( ) : double |
Gets the square of the euclidean norm.
|
|
NormSquared ( Vector2 vector ) : double |
Gets the square of the euclidean norm of the specified vector.
|
|
Normalize ( Vector2 vector ) : Vector2 |
Normalizes a vector.
|
|
Normalize ( ) : void |
Normalizes the vector.
|
|
Rotate ( Vector2 vector, double cosineOfAngle, double sineOfAngle ) : Vector2 |
Rotates a vector by a specified angle.
|
|
Rotate ( double cosineOfAngle, double sineOfAngle ) : void |
Rotates the vector by the specified angle.
|
|
Scale ( Vector2 vector, Vector2 factor ) : Vector2 |
Scales a vector by a specified factor.
|
|
Scale ( Vector2 factor ) : void |
Scales the vector by a specified factor.
|
|
ToString ( ) : string |
Returns the representation of the vector in string format
|
|
Translate ( Vector2 vector, Vector2 offset ) : Vector2 |
Translates a vector by a specified offset.
|
|
Translate ( Vector2 offset ) : void |
Translates the vector by a specified offset.
|
|
Vector2 ( double x, double y ) : System |
Creates a new two-dimensional vector.
|
|
operator ( ) : Vector2 |
Adds two vectors.
|
|
operator ( ) : bool |
Checks whether the two specified vectors are equal.
|
public static Dot ( Vector2 a, Vector2 b ) : double | ||
a | Vector2 | The first vector. |
b | Vector2 | The second vector. |
return | double |
public static IsNullVector ( Vector2 vector ) : bool | ||
vector | Vector2 | |
return | bool |
public IsNullVector ( double tolerance ) : bool | ||
tolerance | double | The highest absolute value that each component of the vector may have before the vector is not considered a null vector. |
return | bool |
public static Norm ( Vector2 vector ) : double | ||
vector | Vector2 | The vector. |
return | double |
public static NormSquared ( Vector2 vector ) : double | ||
vector | Vector2 | The vector. |
return | double |
public static Normalize ( Vector2 vector ) : Vector2 | ||
vector | Vector2 | The vector. |
return | Vector2 |
public static Rotate ( Vector2 vector, double cosineOfAngle, double sineOfAngle ) : Vector2 | ||
vector | Vector2 | The vector. |
cosineOfAngle | double | The cosine of the angle. |
sineOfAngle | double | The sine of the angle. |
return | Vector2 |
public Rotate ( double cosineOfAngle, double sineOfAngle ) : void | ||
cosineOfAngle | double | The cosine of the angle. |
sineOfAngle | double | The sine of the angle. |
return | void |
public static Scale ( Vector2 vector, Vector2 factor ) : Vector2 | ||
vector | Vector2 | The vector. |
factor | Vector2 | The factor. |
return | Vector2 |
public static Translate ( Vector2 vector, Vector2 offset ) : Vector2 | ||
vector | Vector2 | The vector. |
offset | Vector2 | The offset. |
return | Vector2 |
public Translate ( Vector2 offset ) : void | ||
offset | Vector2 | The offset. |
return | void |
public Vector2 ( double x, double y ) : System | ||
x | double | The x-coordinate. |
y | double | The y-coordinate. |
return | System |