Skip to content

Commit

Permalink
[RN] Use default param for elastic bounciness
Browse files Browse the repository at this point in the history
  • Loading branch information
sahrens committed Sep 2, 2015
1 parent b17b328 commit 4379aa0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Libraries/Animated/Easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ class Easing {
* http://tiny.cc/elastic_b_1 (default bounciness = 1)
* http://tiny.cc/elastic_b_3 (bounciness = 3)
*/
static elastic(bounciness: number): (t: number) => number {
if (arguments.length === 0) {
bounciness = 1;
}
static elastic(bounciness: number = 1): (t: number) => number {
var p = bounciness * Math.PI;
return (t) => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
};
Expand Down

0 comments on commit 4379aa0

Please sign in to comment.