The value to be clamped.
Minimum value.
Maximum value.
Clamped value.
Smoothly interpolates between two values using cubic formula
-
-
-
Result of the interpolation within the range of [startValue, endValue]
Checks if the value of a given number is inside an upper or lower bound. The bounds may be undefined, in which case their value is ignored.
Value to check.
The lower bound to check the value against.
The upper bound to check the value against.
true
if value is inside the bounds or if the bounds are undefined
, false
otherwise.
Maps a number from one range to another.
The incoming value to be converted.
Lower bound of the value's current range.
Upper bound of the value's current range.
Lower bound of the value's target range.
Upper bound of the value's target range.
Returns the larger of the two given numbers. Both numbers may be undefined, in which case the result is undefined. If only one of the numbers is undefined, the other number is returned.
First number.
Second number.
Returns the smaller of the two given numbers. Both numbers may be undefined, in which case the result is undefined. If only one of the numbers is undefined, the other number is returned.
First number.
Second number.
Returns a smooth interpolation between the values edge0 and edge1 based on the interpolation
factor x. 0 <= x <= 1
.
-
-
-
Returns a smooth interpolation between the values edge0 and edge1 based on the interpolation
factor x. 0 <= x <= 1
.
Improved version by Ken Perlin, which has zero 1st- and 2nd-order derivatives at x = 0
and
x = 1
:
-
-
-
Generated using TypeDoc
Ensures that input value fits in a given range.