value to clamp
lower bound
upper bound
Clamps value x
to closed [0 .. 1] interval.
Clamps value x
to closed [0 .. 0.5] interval.
Clamps value x
to closed [-1 .. 1] interval.
If abs(x) > abs(e)
, recursively mirrors x
back into [-e .. +e]
interval at respective positive/negative boundary.
threshold (> 0)
input value
Returns true iff x
is in open interval (min .. max)
-
-
-
Returns true iff x
is in closed interval [min .. max]
-
-
-
Returns the non-zero minimum value of the given a
, b
args.
Returns the non-zero minimum value of the given a
, b
, c
args.
Same as smin(smax(x, min, k), max, k)
.
-
-
-
-
Smooth maximum. Note: Result values will be slightly larger than max value near max(a,b) + eps due to exponential decay. Higher k
values reduce the error, but also reduce the smoothing. Recommended k=16.
-
-
smooth exponent (MUST be > 0)
See smax()
.
-
-
smooth exponent (MUST be > 0)
Folds x
back inside closed [min..max] interval. Also see wrapOnce.
-
-
-
Similar to wrapOnce for [0..1] interval.
-
Similar to wrapOnce for [-1..1] interval.
-
Like wrap, but optimized for cases where x
is guaranteed to be in [min - d, max + d]
interval, where d = max - min
. Result will be in closed [min..max]
interval.
-
-
-
Generated using TypeDoc
Clamps value
x
to given closed interval.