clamp

Clamps a float point between -1.0 and +1.0

@safe @nogc pure nothrow
T
clamp
(
T = float
)
(
in T x
)
if (
__traits(isFloating, T)
)

Parameters

x T

Float point number to clamp Returns A flot point number clamped between -1.0 and 1.0

Meta