Arcade
|
A two component vector of integers. More...
Public Member Functions | |
Vector2I (int x, int y) | |
Constructs a vector from the given X and Y components. More... | |
int | Dot (Vector2I vec) |
Finds the scalar product of this vector and another. More... | |
override bool | Equals (object obj) |
bool | Equals (Vector2I 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 implicit | operator Vector2F (Vector2I vec) |
static Vector2I | operator+ (Vector2I vec) |
The identity operator. More... | |
static Vector2I | operator+ (Vector2I a, Vector2I b) |
Component-wise addition of a vector to another. More... | |
static Vector2I | operator- (Vector2I vec) |
Finds the negation of a vector. More... | |
static Vector2I | operator- (Vector2I a, Vector2I b) |
Component-wise subtraction of a vector from another. More... | |
static Vector2I | operator* (Vector2I a, Vector2I b) |
Component-wise multiplication of a vector by another. More... | |
static Vector2I | operator* (Vector2I vec, int val) |
Multiplies a vector by a scalar. More... | |
static Vector2F | operator* (Vector2I vec, float val) |
Multiplies a vector by a scalar. More... | |
static Vector2I | operator* (int val, Vector2I vec) |
Multiplies a vector by a scalar. More... | |
static Vector2F | operator* (float val, Vector2I vec) |
Multiplies a vector by a scalar. More... | |
static Vector2I | operator/ (Vector2I a, Vector2I b) |
Component-wise division of this vector by another. More... | |
static Vector2I | operator/ (Vector2I vec, int val) |
Division of this vector by a scalar. More... | |
static Vector2F | operator/ (Vector2I vec, float val) |
static Vector2I | operator/ (int val, Vector2I vec) |
static Vector2F | operator/ (float val, Vector2I vec) |
Public Attributes | |
int | X |
Horizontal component. More... | |
int | Y |
Vertical component. More... | |
Static Public Attributes | |
static readonly Vector2I | Zero = new Vector2I(0, 0) |
A vector with zero for all components. More... | |
static readonly Vector2I | UnitX = new Vector2I(1, 0) |
A normalized vector along the positive X axis. More... | |
static readonly Vector2I | UnitY = new Vector2I(0, 1) |
A normalized vector along the positive Y axis. More... | |
Properties | |
float | Length [get] |
Floating point magnitude of the vector. More... | |
int | ManhattanLength [get] |
Magnitude of the vector in Taxicab geometry. More... | |
int | LengthSquared [get] |
Sum of each component squared. More... | |
Vector2F | Normalized [get] |
Gets a normalized vector in the same direction as this one. More... | |
Vector2I | Left [get] |
Gets a vector equal to this one rotated counter-clockwise by 90 degrees. More... | |
Vector2I | Right [get] |
Gets a vector equal to this one rotated clockwise 90 degrees. More... | |
Vector2I | Back [get] |
Gets a vector equal to this one rotated 180 degrees. More... | |
A two component vector of integers.
|
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.
|
inline |
Component-wise multiplication of a vector by another.
Multiplies a vector by a scalar.
Multiplies a vector by a scalar.
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 this vector by another.
Division of this vector by a scalar.
|
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.
int GameAPI.Vector2I.X |
Horizontal component.
int GameAPI.Vector2I.Y |
Vertical component.
A vector with zero for all components.
|
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 |
Floating point 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.