I have the following piece of code
int steps = 10;
for (int i = 0; i <= steps; i++) {
float t = i / float(steps);
console.log( "t " + t );
}
That out puts numbers in a linear fashion like this { 0, 0.1, 0.2, ..., 0.9, 1.0 } I would like apply the cubic (in or out) easing equation so the output numbers increase or decrease gradually
UPDATE
Not sure if my implementation if correct but I am getting curve as expected
float b = 0;
float c = 1;
float d = 1;
for (int i = 0; i <= steps; i++) {
float t = i / float(steps);
t /= d;
float e = c * t * t * t + b;
console.log( "e " + e );
//console.log( "t " + t );
}