gfx ~master (2022-03-26T21:17:36.9160143)
Dub
Repo
normalize
gfx
math
vec
Compute the normalization of a vector.
template
normalize
(T, size_t N)
pure @
safe
nothrow @
nogc
pure nothrow @
nogc
@
safe
Vec
!(
T
,
N
)
normalize
(
in
Vec
!(
T
,
N
)
v
)
out (res) { assert (approxUlpAndAbs(magnitude(res), 1)); }
if
(
isFloatingPoint
!
T
)
Members
Functions
normalize
Vec
!(
T
,
N
)
normalize
(Vec!(T, N) v)
Undocumented in source.
Meta
Source
See Implementation
gfx
math
vec
aliases
DVec
DVec2
DVec3
DVec4
FVec
FVec2
FVec3
FVec4
IVec
IVec2
IVec3
IVec4
Vec2
Vec3
Vec4
dvec
fvec
ivec
vec2
vec3
vec4
enums
isVec2
isVec3
isVec4
numComps
functions
compTup
vec
structs
Vec
templates
CompTup
cross
dot
isVec
magnitude
normalize
squaredMag
Compute the normalization of a vector.