gfx.math.vec

Vector linear algebra module

Members

Aliases

DVec
alias DVec(int N) = Vec!(double, N)
Undocumented in source.
DVec2
alias DVec2 = Vec!(double, 2)
Undocumented in source.
DVec3
alias DVec3 = Vec!(double, 3)
Undocumented in source.
DVec4
alias DVec4 = Vec!(double, 4)
Undocumented in source.
FVec
alias FVec(int N) = Vec!(float, N)
Undocumented in source.
FVec2
alias FVec2 = Vec!(float, 2)
Undocumented in source.
FVec3
alias FVec3 = Vec!(float, 3)
Undocumented in source.
FVec4
alias FVec4 = Vec!(float, 4)
Undocumented in source.
IVec
alias IVec(int N) = Vec!(int, N)
Undocumented in source.
IVec2
alias IVec2 = Vec!(int, 2)
Undocumented in source.
IVec3
alias IVec3 = Vec!(int, 3)
Undocumented in source.
IVec4
alias IVec4 = Vec!(int, 4)
Undocumented in source.
Vec2
alias Vec2(T) = Vec!(T, 2)
Undocumented in source.
Vec3
alias Vec3(T) = Vec!(T, 3)
Undocumented in source.
Vec4
alias Vec4(T) = Vec!(T, 4)
Undocumented in source.
dvec
alias dvec = vec!double
fvec
alias fvec = vec!float
ivec
alias ivec = vec!int

Build a Vec with specified component type T and size deducted from arguments.

vec2
alias vec2 = vec!2
vec3
alias vec3 = vec!3
vec4
alias vec4 = vec!4

Build a Vec with specified size and type deducted from arguments

Enums

isVec2
eponymoustemplate isVec2(VecT)
isVec3
eponymoustemplate isVec3(VecT)
isVec4
eponymoustemplate isVec4(VecT)

Check whether VecT is a Vec of size N

numComps
eponymoustemplate numComps(T...)
Undocumented in source.

Functions

compTup
auto compTup(T vals)
Undocumented in source. Be warned that the author may not have intended to support it.
vec
auto vec(Comps comps)
auto vec(Arr arr)

Build a Vec whose component type and size is deducted from arguments.

Structs

Vec
struct Vec(T, size_t N)
Undocumented in source.

Templates

CompTup
template CompTup(T...)
Undocumented in source.
cross
template cross(T)

Vector cross product

dot
template dot(T, size_t N)

Compute the dot product of two vectors.

isVec
template isVec(VecT)

Check whether VecT is a Vec

isVec
template isVec(size_t N, VecT)

Check whether VecT is a Vec of size N

magnitude
template magnitude(T, size_t N)

Compute the magnitude of a vector. This is not to be confused with length which gives the number of components.

normalize
template normalize(T, size_t N)

Compute the normalization of a vector.

squaredMag
template squaredMag(T, size_t N)

Compute the squared magnitude of a vector.

vec
template vec(T)

Build a Vec with specified component type T and size deducted from arguments.

vec
template vec(size_t N)

Build a Vec with specified size and type deducted from arguments

Meta