Documentation
¶
Overview ¶
The interp package is a collection of interpolation functions.
Most functions are controlled by the first argument t as it ranges between 0.0 and 1.0.
With the exception of 'Clamp', functions in this package take one of three forms.
_: Functions that do not end with 'step' or 'mix' return normalized values that are not clamped.
_Step: Function that end with 'step', return normalized values that clamp between 0.0 and 1.0
_Mix: Functions that end with 'mix', return results that are not normalized, and rage across the provided arguments
Index ¶
- func Clamp(t float64, x float64, y float64) (r float64)
- func Easein(t float64, exp float64) float64
- func Easeinstep(t float64, exp float64) float64
- func Easeout(t float64, exp float64) float64
- func Easeoutstep(t float64, exp float64) float64
- func Linearstep(t float64) (r float64)
- func Map(t float64, x float64, y float64) float64
- func Mix(t float64, x float64, y float64) float64
- func Smoothmix(t float64, x float64, y float64) (r float64)
- func Smoothstep(t float64) float64
- func Step(t float64, x float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Easeinstep ¶
func Easeoutstep ¶
func Linearstep ¶
Linear mapping of t, in the rage 0.0 to 1.0
func Mix ¶
Mix returns x when t is 0 and y when t is 1.0, and blends between x and y between 0.0 and 1.0. Mix does not clamp results if t is outside the range 0.0 to 1.0, the results is a value along along the slope of x and y. In this context 't' is sometimes referred to as 'alpha'
func Smoothmix ¶
Smoothmix returns a smoothstep value between 0.0 and 1.0 as t ranges between x and y.
func Smoothstep ¶
Smoothstep return a value between 0.0 and 1.0 that eases in and out as as t ranges between 0.0 and 1.0
Types ¶
This section is empty.



