1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-19 11:21:20 +02:00

Easing’s JSDoc

This commit is contained in:
Antonio Laguna
2017-01-27 15:34:34 +01:00
parent 86cc1f494f
commit 049d083744

View File

@@ -1,7 +1,17 @@
/**
* Swing easing function.
* @param {number} p The percentage of time that has passed.
* @return {number}
*/
function swing (p) {
return 0.5 - Math.cos(p * Math.PI) / 2;
}
/**
* Linear easing function.
* @param {number} p The percentage of time that has passed.
* @return {number}
*/
function linear(p) {
return p;
}