2012-10-29 23:03:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Easy curve computation for fades etc.
|
|
|
|
|
|
|
|
// output range: [0.0, 1.0]
|
|
|
|
float linearInOut(int t, int fadeInLength, int solidLength, int fadeOutLength);
|
|
|
|
float linearIn(int t, int fadeInLength);
|
|
|
|
float linearOut(int t, int fadeInLength);
|
|
|
|
|
|
|
|
// smooth operator [0, 1] -> [0, 1]
|
|
|
|
float ease(float val);
|
2012-11-21 14:30:43 +00:00
|
|
|
float ease(int t, int fadeLength);
|
2012-10-29 23:03:07 +00:00
|
|
|
|
2017-03-20 00:09:42 +00:00
|
|
|
float bezierEase(float val);
|
2017-03-19 22:41:48 +00:00
|
|
|
float bezierEaseInOut(float val);
|
2017-03-20 00:09:42 +00:00
|
|
|
float bezierEaseIn(float val);
|
|
|
|
float bezierEaseOut(float val);
|
2017-03-19 22:41:48 +00:00
|
|
|
|
2012-10-29 23:03:07 +00:00
|
|
|
// need a bouncy ease
|
|
|
|
|
|
|
|
// waveforms [0, 1]
|
|
|
|
float sawtooth(int t, int period);
|
|
|
|
|
|
|
|
// output range: -1.0 to 1.0
|
|
|
|
float passWithPause(int t, int fadeInLength, int pauseLength, int fadeOutLength);
|