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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user