From f401e90748b3da761a896644dcad0e45281e15d7 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Wed, 13 Apr 2016 02:55:28 +0200 Subject: [PATCH 1/2] Update anim_ease.js --- src/util/anim_ease.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/anim_ease.js b/src/util/anim_ease.js index b34d94b3cc0..ec097ab6dd0 100644 --- a/src/util/anim_ease.js +++ b/src/util/anim_ease.js @@ -6,7 +6,12 @@ s = p / 4; } else { - s = p / (2 * Math.PI) * Math.asin(c / a); + //handle the 0/0 case: + if (c === 0 && a === 0) { + s = p / (2 * Math.PI) * Math.asin(1); + } else { + s = p / (2 * Math.PI) * Math.asin(c / a); + } } return { a: a, c: c, p: p, s: s }; } From e7d079f66089788d9dfdcfcad8474c903cc3ea5d Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Wed, 13 Apr 2016 03:01:18 +0200 Subject: [PATCH 2/2] Update anim_ease.js --- src/util/anim_ease.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/anim_ease.js b/src/util/anim_ease.js index ec097ab6dd0..32b79b2cb47 100644 --- a/src/util/anim_ease.js +++ b/src/util/anim_ease.js @@ -9,7 +9,8 @@ //handle the 0/0 case: if (c === 0 && a === 0) { s = p / (2 * Math.PI) * Math.asin(1); - } else { + } + else { s = p / (2 * Math.PI) * Math.asin(c / a); } }