vec4i class by value built-in

Four-dimensional vector with integer components

Constructors

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

Operators

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

Properties

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

Operator documentation

vec4i vec4i::opDiv(int) const /

Divides every component by a number

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

vec4i vec4i::opDiv(const vec4i&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 vec4i::length read-only

Length of the vector

Rounded down to a whole number.