step

CommonType!(T1, T2)
step
(
T1
T2
)
(
T1 edge
,
T2 x
)

Return Value

Type: CommonType!(T1, T2)

0.0 if x < edge, otherwise it returns 1.0.

Examples

assert(step(0, 1) == 1.0f);
assert(step(0, 10) == 1.0f);
assert(step(1, 0) == 0.0f);
assert(step(10, 0) == 0.0f);
assert(step(1, 1) == 1.0f);

Meta