Skip to content

Commit 4379aa0

Browse files
committed
[RN] Use default param for elastic bounciness
1 parent b17b328 commit 4379aa0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Libraries/Animated/Easing.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ class Easing {
6969
* http://tiny.cc/elastic_b_1 (default bounciness = 1)
7070
* http://tiny.cc/elastic_b_3 (bounciness = 3)
7171
*/
72-
static elastic(bounciness: number): (t: number) => number {
73-
if (arguments.length === 0) {
74-
bounciness = 1;
75-
}
72+
static elastic(bounciness: number = 1): (t: number) => number {
7673
var p = bounciness * Math.PI;
7774
return (t) => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
7875
};

0 commit comments

Comments
 (0)