Module interpolate
Various mathematical functions for interpolating values.
Functions
cosine (offset, min, max) | Performs a cosine interpolation with the given offset between the given min and max values. |
linear (offset, min, max) | Performs a linear interpolation with the given offset between the given min and max values. |
Functions
- cosine (offset, min, max)
-
Performs a cosine interpolation with the given offset between the given
min and max values.
Parameters:
- offset The offset to get, should be between 0 and 1.
- min Optional. The minimum value of the range, defaults to 0.
- max Optional. The maximum value of the range, defaults to 1.
Returns:
-
The interpolated value at the given offset.
- linear (offset, min, max)
-
Performs a linear interpolation with the given offset between the given
min and max values.
Parameters:
- offset The offset to get, should be between 0 and 1.
- min Optional. The minimum value of the range, defaults to 0.
- max Optional. The maximum value of the range, defaults to 1.
Returns:
-
The interpolated value at the given offset.