|
Euphoria
|
A tweakable curve similar to easing functions. More...
Classes | |
| struct | eu::core::SCurve |
| Contains the parameters for an S-Curve. More... | |
Functions | |
| SCurve | eu::core::s_curve_from_input (float x, float y) |
| Generate an S-Curve from user input. | |
| float | eu::core::calculate_s_curve (float x, float slope, float threshold) |
| Calculates an S-Curve. | |
A tweakable curve similar to easing functions.
Discovered by Yann van der Cruyssen/Morusque on twitter. From A Convenient Generalization of Schlick’s Bias and Gain Functions (pdf) by Jonathan T. Barron.
#include <libs/core/src/eu/core/scurve.h>
Calculates an S-Curve.
this takes floats instead of the curve since that means it could more easily be copied to glsl
| x | [0,1] |
| slope | >=0 |
| threshold | [0,1] |