simple_easing/
circ.rs

1/// <https://easings.net/#easeInCirc>
2pub fn circ_in(t: f32) -> f32 {
3	1.0 - (1.0 - t.powi(2)).sqrt()
4}
5
6/// <https://easings.net/#easeOutCirc>
7pub fn circ_out(t: f32) -> f32 {
8	(1.0 - (t - 1.0).powi(2)).sqrt()
9}
10
11/// <https://easings.net/#easeInOutCirc>
12pub fn circ_in_out(t: f32) -> f32 {
13	if t < 0.5 {
14		(1.0 - (1.0 - (2.0 * t).powi(2)).sqrt()) / 2.0
15	} else {
16		((1.0 - (-2.0 * t + 2.0).powi(2)).sqrt() + 1.0) / 2.0
17	}
18}