From 4379aa00deee71f56832bcaea0da19c47a6148d7 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Tue, 1 Sep 2015 20:33:25 -0700 Subject: [PATCH] [RN] Use default param for elastic bounciness --- Libraries/Animated/Easing.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Libraries/Animated/Easing.js b/Libraries/Animated/Easing.js index 58969278b..fe40b20b2 100644 --- a/Libraries/Animated/Easing.js +++ b/Libraries/Animated/Easing.js @@ -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); };