Vector2

Utility template struct for manipulating 2-dimensional vectors.

Constructors

this
this(T X, T Y)

Construct the vector from its coordinates.

this
this(Vector2!(E) otherVector)

Construct the vector from another type of vector.

Members

Functions

opAssign
Vector2!(T) opAssign(Vector2!(E) otherVector)

Assign the value of another vector whose type can be converted to T.

opBinary
Vector2!(T) opBinary(Vector2!(E) otherVector)

Add/Subtract between two vector2's.

opBinary
Vector2!(T) opBinary(E num)

Multiply/Divide a vector with a numaric value.

opEquals
bool opEquals(const Vector2!(E) otherVector)

Compare two vectors for equality.

opOpAssign
Vector2!(T) opOpAssign(Vector2!(E) otherVector)

Assign Add/Subtract with another vector2.

opOpAssign
Vector2!(T) opOpAssign(E num)

Assign Multiply/Divide with a numaric value.

opUnary
Vector2!(T) opUnary()

Invert the members of the vector.

toString
string toString()

Output the string representation of the Vector2.

Variables

x
T x;

X coordinate of the vector.

y
T y;

Y coordinate of the vector.

Meta