|
Arcade
|
A two component vector of floats. More...
Public Member Functions | |
| Vector2F (float x, float y) | |
| Constructs a vector from the given X and Y components. More... | |
| float | Dot (Vector2F vec) |
| Finds the scalar product of this vector and another. More... | |
| Vector2F | Rotate (float radians) |
| Returns this vector rotated about the origin by the given number of radians. More... | |
| Vector2F | Rotate (Vector2F axis, float radians) |
| Returns this vector rotated about a given axis by the given number of radians. More... | |
| override bool | Equals (object obj) |
| bool | Equals (Vector2F vec) |
| Tests for equality with another vector. More... | |
| override int | GetHashCode () |
| override string | ToString () |
| Gets a string representing this vector in (X, Y) format. More... | |
Static Public Member Functions | |
| static | operator Vector2I (Vector2F vec) |
| static Vector2F | operator+ (Vector2F vec) |
| The identity operator. More... | |
| static Vector2F | operator+ (Vector2F a, Vector2F b) |
| Component-wise addition of a vector to another. More... | |
| static Vector2F | operator- (Vector2F vec) |
| Finds the negation of a vector. More... | |
| static Vector2F | operator- (Vector2F a, Vector2F b) |
| Component-wise subtraction of a vector from another. More... | |
| static Vector2F | operator* (Vector2F a, Vector2F b) |
| Component-wise multiplication of a vector and another. More... | |
| static Vector2F | operator* (Vector2F vec, float val) |
| Multiplies a vector by a scalar. More... | |
| static Vector2F | operator* (float val, Vector2F vec) |
| Multiplies a vector by a scalar. More... | |
| static Vector2F | operator/ (Vector2F a, Vector2F b) |
| Component-wise division of a vector by another. More... | |
| static Vector2F | operator/ (Vector2F vec, float val) |
| Division of a vector by a scalar. More... | |
| static Vector2F | operator/ (float val, Vector2F vec) |
| Division of a vector by a scalar. More... | |
| static Vector2F | FromAngle (float radians) |
| Finds a normalized vector representation of the given angle in radians. More... | |
Public Attributes | |
| float | X |
| Horizontal component. More... | |
| float | Y |
| Vertical component. More... | |
Static Public Attributes | |
| static readonly Vector2F | Zero = new Vector2F(0f, 0f) |
| A vector with zero for all components. More... | |
| static readonly Vector2F | UnitX = new Vector2F(1f, 0f) |
| A normalized vector along the positive X axis. More... | |
| static readonly Vector2F | UnitY = new Vector2F(0f, 1f) |
| A normalized vector along the positive Y axis. More... | |
Properties | |
| float | Length [get] |
| Magnitude of the vector. More... | |
| float | ManhattanLength [get] |
| Magnitude of the vector in Taxicab geometry. More... | |
| float | LengthSquared [get] |
| Sum of each component squared. More... | |
| Vector2F | Normalized [get] |
| Gets a normalized vector in the same direction as this one. More... | |
| float | Angle [get] |
| Gets the angle of this vector from the positive X axis. More... | |
| Vector2F | Left [get] |
| Gets a vector equal to this one rotated counter-clockwise by 90 degrees. More... | |
| Vector2F | Right [get] |
| Gets a vector equal to this one rotated clockwise 90 degrees. More... | |
| Vector2F | Back [get] |
| Gets a vector equal to this one rotated 180 degrees. More... | |
A two component vector of floats.
|
inline |
Constructs a vector from the given X and Y components.
|
inline |
Finds the scalar product of this vector and another.
|
inline |
|
inline |
Tests for equality with another vector.
|
inlinestatic |
Finds a normalized vector representation of the given angle in radians.
|
inline |
Component-wise multiplication of a vector and another.
Multiplies a vector by a scalar.
Multiplies a vector by a scalar.
Component-wise addition of a vector to another.
Finds the negation of a vector.
Component-wise subtraction of a vector from another.
Component-wise division of a vector by another.
Division of a vector by a scalar.
Division of a vector by a scalar.
|
inline |
Returns this vector rotated about the origin by the given number of radians.
| radians | Angle to rotate by. |
Returns this vector rotated about a given axis by the given number of radians.
| axis | Position to rotate around. |
| radians | Angle to rotate by. |
|
inline |
Gets a string representing this vector in (X, Y) format.
A normalized vector along the positive X axis.
A normalized vector along the positive Y axis.
| float GameAPI.Vector2F.X |
Horizontal component.
| float GameAPI.Vector2F.Y |
Vertical component.
A vector with zero for all components.
|
get |
Gets the angle of this vector from the positive X axis.
|
get |
Gets a vector equal to this one rotated 180 degrees.
|
get |
Gets a vector equal to this one rotated counter-clockwise by 90 degrees.
|
get |
Magnitude of the vector.
|
get |
Sum of each component squared.
|
get |
Magnitude of the vector in Taxicab geometry.
|
get |
Gets a normalized vector in the same direction as this one.
|
get |
Gets a vector equal to this one rotated clockwise 90 degrees.