smoothstep

Smoothstep from edge0 to edge1 at x.

@safe pure nothrow
CommonType!(T1, T2, T3)
smoothstep
(
T1
T2
T3
)
(,,
T3 x
)
if (
isFloatingPoint!(CommonType!(T1, T2, T3))
)

Return Value

Type: CommonType!(T1, T2, T3)

0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth hermite interpolation between 0 and 1 when edge0 < x < edge1. This is useful in cases where you would want a threshold function with a smooth transition.

Meta