gfm.math.vector

Undocumented in source.

Members

Aliases

DimensionType
alias DimensionType(T : Vector!U, U...) = U[0]

Get the numeric type used to measure a vectors's coordinates.

isVectorInstantiation
deprecated alias isVectorInstantiation(T) = isVector!T
Undocumented in source.
vec2b
alias vec2b = vec2!byte
Undocumented in source.
vec2d
alias vec2d = vec2!double
Undocumented in source.
vec2f
alias vec2f = vec2!float
Undocumented in source.
vec2i
alias vec2i = vec2!int
Undocumented in source.
vec2l
alias vec2l = vec2!long
Undocumented in source.
vec2s
alias vec2s = vec2!short
Undocumented in source.
vec2ub
alias vec2ub = vec2!ubyte
Undocumented in source.
vec2ui
alias vec2ui = vec2!uint
Undocumented in source.
vec2ul
alias vec2ul = vec2!ulong
Undocumented in source.
vec2us
alias vec2us = vec2!ushort
Undocumented in source.
vec3b
alias vec3b = vec3!byte
Undocumented in source.
vec3d
alias vec3d = vec3!double
Undocumented in source.
vec3f
alias vec3f = vec3!float
Undocumented in source.
vec3i
alias vec3i = vec3!int
Undocumented in source.
vec3l
alias vec3l = vec3!long
Undocumented in source.
vec3s
alias vec3s = vec3!short
Undocumented in source.
vec3ub
alias vec3ub = vec3!ubyte
Undocumented in source.
vec3ui
alias vec3ui = vec3!uint
Undocumented in source.
vec3ul
alias vec3ul = vec3!ulong
Undocumented in source.
vec3us
alias vec3us = vec3!ushort
Undocumented in source.
vec4b
alias vec4b = vec4!byte
Undocumented in source.
vec4d
alias vec4d = vec4!double
Undocumented in source.
vec4f
alias vec4f = vec4!float
Undocumented in source.
vec4i
alias vec4i = vec4!int
Undocumented in source.
vec4l
alias vec4l = vec4!long
Undocumented in source.
vec4s
alias vec4s = vec4!short
Undocumented in source.
vec4ub
alias vec4ub = vec4!ubyte
Undocumented in source.
vec4ui
alias vec4ui = vec4!uint
Undocumented in source.
vec4ul
alias vec4ul = vec4!ulong
Undocumented in source.
vec4us
alias vec4us = vec4!ushort
Undocumented in source.

Enums

isVector
eponymoustemplate isVector(T)

True if T is some kind of Vector

Functions

angleBetween
T angleBetween(Vector!(T, N) a, Vector!(T, N) b)
cross
Vector!(T, 3) cross(Vector!(T, 3) a, Vector!(T, 3) b)
dot
T dot(Vector!(T, N) a, Vector!(T, N) b)
maxByElem
Vector!(T, N) maxByElem(Vector!(T, N) a, Vector!(T, N) b)

Element-wise maximum.

minByElem
Vector!(T, N) minByElem(Vector!(T, N) a, Vector!(T, N) b)

Element-wise minimum.

reflect
Vector!(T, N) reflect(Vector!(T, N) a, Vector!(T, N) b)

3D reflect, like the GLSL function.

Structs

Vector
struct Vector(T, int N)

Generic 1D small vector.

Templates

vec2
template vec2(T)
Undocumented in source.
vec3
template vec3(T)
Undocumented in source.
vec4
template vec4(T)
Undocumented in source.

Meta