Vector3

Utility template struct for manipulating 3-dimensional vectors

Vector3 is a simple class that defines a mathematical vector with three coordinates (x, y and z).

It can be used to represent anything that has three dimensions: a size, a point, a velocity, etc.

The template parameter T is the type of the coordinates. It can be any type that supports arithmetic operations (+, -, /, *) and comparisons (==, !=), for example int or float.

Constructors

this
this(T X, T Y, T Z)

Construct the vector from its coordinates

this
this(Vector3!(E) otherVector)

Construct the vector from another type of vector

Members

Functions

opAssign
Vector3!(T) opAssign(Vector3!(E) otherVector)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Vector3!(T) opBinary(Vector3!(E) otherVector)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
Vector3!(T) opBinary(E num)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
Vector3!(T) opOpAssign(Vector3!(E) otherVector)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
Vector3!(T) opOpAssign(E num)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
Vector3!(T) opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

x
T x;

X coordinate of the vector.

y
T y;

Y coordinate of the vector.

z
T z;

Z coordinate of the vector.

Meta