vec4

4 component vector

Constructors

this
this(float v)

create with all components filled with specified value

this
this(float[4] v)
Undocumented in source.
this
this(vec4 v)
Undocumented in source.
this
this(float x, float y, float z, float w)
Undocumented in source.
this
this(vec3 v)
Undocumented in source.

Members

Aliases

a
alias a = w
Undocumented in source.
b
alias b = z
Undocumented in source.
g
alias g = y
Undocumented in source.
length
alias length = magnitude
Undocumented in source.
r
alias r = x
Undocumented in source.

Functions

add
vec4 add(float v)

add value to all components of vector

add
vec4 add(vec4 v)

add components of another vector to corresponding components of this vector

clear
vec4 clear(float v)

fill all components of vector with specified value

div
vec4 div(float v)

divide all components of vector by value

div
vec4 div(vec4 v)

divide components of this vector by corresponding components of another vector

dot
float dot(vec4 v)

dot product (sum of by-component products of vector components)

mul
vec4 mul(float v)

multiply all components of vector by value

mul
vec4 mul(vec4 v)

multiply components of this vector by corresponding components of another vector

normalize
void normalize()

normalize vector: make its length == 1

opAssign
vec4 opAssign(float[4] v)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
vec4 opAssign(vec4 v)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
vec4 opAssign(float x, float y, float z, float w)
Undocumented in source. Be warned that the author may not have intended to support it.
opAssign
vec4 opAssign(vec3 v)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
vec4 opBinary(float v)

add value to all components of vector

opBinary
vec4 opBinary(float v)

multiply all components of vector by value

opBinary
vec4 opBinary(float v)

subtract value from all components of vector

opBinary
vec4 opBinary(float v)

divide all components of vector by value

opBinary
vec4 opBinary(vec4 v)

add value to all components of vector

opBinary
vec4 opBinary(vec4 v)

subtract value from all components of vector

opBinary
float opBinary(vec4 v)

subtract value from all components of vector

opBinary
vec4 opBinary(mat4 matrix)

multiply vector by matrix

opOpAssign
vec4 opOpAssign(float v)

add value to all components of vector

opOpAssign
vec4 opOpAssign(float v)

multiply all components of vector by value

opOpAssign
vec4 opOpAssign(float v)

subtract value from all components of vector

opOpAssign
vec4 opOpAssign(float v)

divide all components of vector by value

opOpAssign
vec4 opOpAssign(vec4 v)

by component add values of corresponding components of other vector

opOpAssign
vec4 opOpAssign(vec4 v)

by component multiply values of corresponding components of other vector

opOpAssign
vec4 opOpAssign(vec4 v)

by component subtract values of corresponding components of other vector

opOpAssign
vec4 opOpAssign(vec4 v)

by component divide values of corresponding components of other vector

opUnary
vec4 opUnary()

returns vector with all components which are negative of components for this vector

sub
vec4 sub(float v)

subtract value from all components of vector

sub
vec4 sub(vec4 v)

subtract components of another vector from corresponding components of this vector

Properties

magnitude
float magnitude [@property getter]

length of vector

magnitudeSquared
float magnitudeSquared [@property getter]

sum of squares of all vector components

normalized
vec4 normalized [@property getter]

returns normalized copy of this vector

toString
string toString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Unions

__anonymous
union __anonymous
Undocumented in source.

Meta