mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-20 03:41:38 +02:00
Easing’s JSDoc
This commit is contained in:
@@ -1,7 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* Swing easing function.
|
||||||
|
* @param {number} p The percentage of time that has passed.
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
function swing (p) {
|
function swing (p) {
|
||||||
return 0.5 - Math.cos(p * Math.PI) / 2;
|
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) {
|
function linear(p) {
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user