Public Member Functions | |
| Vector2 (float x, float y) | |
| Constructs a Vector2 object. | |
| Vector2 (double x, double y) | |
| Constructs a Vector2 object. | |
| Vector2 | Normalize () |
| Returns a vector pointing in the same direction as this one, with magnitude 1. | |
| float | DotProduct (Vector2 b) |
| Computes and returns the dot product with another vector. | |
Static Public Member Functions | |
| static | operator Vector3 (Vector2 v) |
| Converts to a Vector3 object, with a Z value of zero. | |
| static Vector2 | operator+ (Vector2 a, Vector2 b) |
| Adds two vectors. | |
| static Vector2 | operator- (Vector2 a, Vector2 b) |
| Subtracts two vectors. | |
| static Vector2 | operator- (Vector2 a) |
| Unary - operator: multiples vector by -1. | |
| static Vector2 | operator* (Vector2 a, float b) |
| Scales a vector by a scalar floating point value. | |
| static Vector2 | operator/ (Vector2 a, float b) |
| Divides a vector's components by a floating point value. | |
| static float | DotProduct (Vector2 a, Vector2 b) |
| Computes and returns the dot product between two vectors. | |
Static Public Attributes | |
| static readonly Vector2 | Empty = new Vector2() |
| Vector representing the origin. | |
Properties | |
| float | X [get, set] |
| X coordinate. | |
| float | Y [get, set] |
| Y coordinate. | |
| bool | IsEmpty [get] |
| Returns true if this vector has zero for all components. | |
| float | MagnitudeSquared [get] |
| Returns the square of the length of the vector. | |
| float | Magnitude [get] |
| Returns the length of the vector. | |
| AgateLib.Geometry.Vector2.Vector2 | ( | float | x, | |
| float | y | |||
| ) |
| AgateLib.Geometry.Vector2.Vector2 | ( | double | x, | |
| double | y | |||
| ) |
Computes and returns the dot product between two vectors.
| a | ||
| b |
| float AgateLib.Geometry.Vector2.DotProduct | ( | Vector2 | b | ) |
Computes and returns the dot product with another vector.
| b |
| Vector2 AgateLib.Geometry.Vector2.Normalize | ( | ) |
Returns a vector pointing in the same direction as this one, with magnitude 1.
Scales a vector by a scalar floating point value.
| a | ||
| b |
Adds two vectors.
| a | ||
| b |
Unary - operator: multiples vector by -1.
| a |
Subtracts two vectors.
| a | ||
| b |
Divides a vector's components by a floating point value.
| a | ||
| b |
readonly Vector2 AgateLib.Geometry.Vector2.Empty = new Vector2() [static] |
Vector representing the origin.
bool AgateLib.Geometry.Vector2.IsEmpty [get] |
Returns true if this vector has zero for all components.
float AgateLib.Geometry.Vector2.Magnitude [get] |
Returns the length of the vector.
float AgateLib.Geometry.Vector2.MagnitudeSquared [get] |
Returns the square of the length of the vector.
float AgateLib.Geometry.Vector2.X [get, set] |
X coordinate.
float AgateLib.Geometry.Vector2.Y [get, set] |
Y coordinate.
|
AgateLib Awesome Game and Tool Engine Library |
|