Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Time Elapsed (seconds) Percentage Elapsed (p) EaseOutQuad Output (p * (2 - p)) Scroll Position (px)
0.2 0.2 / 2 = 0.1 0.1 * (2 - 0.1) = 0.19 0.19 * 200 = 38px
0.4 0.4 / 2 = 0.2 0.2 * (2 - 0.2) = 0.36 0.36 * 200 = 72px
0.6 0.6 / 2 = 0.3 0.3 * (2 - 0.3) = 0.51 0.51 * 200 = 102px
0.8 0.8 / 2 = 0.4 0.4 * (2 - 0.4) = 0.64 0.64 * 200 = 128px
1.0 1.0 / 2 = 0.5 0.5 * (2 - 0.5) = 0.75 0.75 * 200 = 150px
1.2 1.2 / 2 = 0.6 0.6 * (2 - 0.6) = 0.84 0.84 * 200 = 168px
1.4 1.4 / 2 = 0.7 0.7 * (2 - 0.7) = 0.91 0.91 * 200 = 182px
1.6 1.6 / 2 = 0.8 0.8 * (2 - 0.8) = 0.96 0.96 * 200 = 192px
1.8 1.8 / 2 = 0.9 0.9 * (2 - 0.9) = 0.99 0.99 * 200 = 198px
2.0 2.0 / 2 = 1.0 1.0 * (1 - 1.0) = 1.00 1.00 * 200 = 200px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment