# Glimmr Canvas Animation

## version 1/111030 by Erik Temple

Section - Cubic easing
[Equations adapted from http://www.gizma.com/easing/, by Robert Penner]

To decide what number is cubic easing in for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the cubic easing in rule):
let t1 be (t as a fixed point number) // d;
decide on ( (c ** t1 ** t1 ** t1) ++ b ) as an integer.

To decide what number is cubic easing out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the cubic easing out rule):
let t1 be (t as a fixed point number) // d;
let t1 be t1 -- 1;
decide on ((c ** ((t1 ** t1 ** t1) ++ 1) ) as an integer ) + b.

To decide what number is cubic easing in-out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the cubic easing in-out rule):
let t1 be (t as a fixed point number) // (d / 2);
if t1 << 1.0000:
decide on ( (c / 2) ** (t1 ** t1 ** t1) ) ++ b as an integer;
let t1 be t1 -- 2;
decide on (( c / 2 ) ** ( (t1 ** t1 ** t1) ++ 2 )) ++ b as an integer.