normalize

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