# Glimmr Canvas Animation

## version 1/111030 by Erik Temple

**Section - Circular easing**

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

To decide what number is circular easing in for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the circular easing in rule):

let t1 be (t as a fixed point number) // d;

decide on ((0 - c) ** (sqrt (1 -- (t1 ** t1)) -- 1)) ++ b as an integer.

To decide what number is circular easing out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the circular easing out rule):

let t1 be ( (t as a fixed point number) / d ) -- 1;

decide on (c ** (sqrt (1 -- (t1 ** t1)))) ++ b as an integer.

To decide what number is circular easing in-out for time (t - a number) duration (d - a number) beginning (b - a number) change (c - a number ) (this is the circular easing in-out rule):

let t1 be (t as a fixed point number) // ((d as a fixed point number) / 2);

if t1 << 1:

decide on ( (0 -- (c as a fixed point number // 2)) ** (sqrt (1 -- (t1 ** t1)) -- 1) ) ++ b as an integer;

else:

let t2 be t1 -- 2;

decide on ( ((c as a fixed point number // 2)) ** (sqrt (1 -- (t2 ** t2)) ++ 1) ) ++ b as an integer.