vec3i class by value built-in

Three-dimensional vector with integer components

Constructors

vec3i(const vec3i&in)
Creates a copy of another vector
vec3i(int, int, int)
Creates a vector from X, Y and Z components

Operators

vec3i opAdd(const vec3i&in) const +
Adds two vectors
vec3i& opAddAssign(const vec3i&in) +=
Adds another vector in place
vec3i& opAssign(const vec3i&in) =
Copies another vector
vec3i opDiv(int) const /
Divides every component by a number
vec3i opDiv(const vec3i&in) const /
Divides the vectors component by component
vec3i& opDivAssign(int) /=
Divides every component by a number in place
vec3i& opDivAssign(const vec3i&in) /=
Divides by another vector component by component in place
bool opEquals(const vec3i&in) const ==
Returns whether all components are equal
vec3i opMul(int) const *
Multiplies every component by a number
vec3i opMul(const vec3i&in) const *
Multiplies the vectors component by component
vec3i& opMulAssign(int) *=
Multiplies every component by a number in place
vec3i& opMulAssign(const vec3i&in) *=
Multiplies by another vector component by component in place
vec3i opNeg() const -x
Returns the vector with all components negated
vec3i opSub(const vec3i&in) const -
Subtracts two vectors
vec3i& opSubAssign(const vec3i&in) -=
Subtracts another vector in place

Properties

int length read-only
Length of the vector
int x
X component
int y
Y component
int z
Z component

Operator documentation

vec3i vec3i::opDiv(int) const /

Divides every component by a number

Integer division, the results are truncated towards zero. Dividing by zero is not allowed.

vec3i vec3i::opDiv(const vec3i&in) const /

Divides the vectors component by component

Integer division, the results are truncated towards zero. No component of the divisor may be zero.

Property documentation

int vec3i::length read-only

Length of the vector

Rounded down to a whole number.