]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Simplify formulas based on code review
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 8 Jul 2017 13:38:40 +0000 (15:38 +0200)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 8 Jul 2017 16:02:33 +0000 (12:02 -0400)
src/helpers/helpers.easing.js

index 975cc9288381d68107faf3958f2fff0f38000083..23ca6fff0808c233595edb8c5f79be97d6070f5f 100644 (file)
@@ -131,9 +131,9 @@ var effects = {
                        return 1;
                }
                if (!p) {
-                       p = 1 * 0.3;
+                       p = 0.3;
                }
-               if (a < Math.abs(1)) {
+               if (a < 1) {
                        a = 1;
                        s = p / 4;
                } else {
@@ -153,9 +153,9 @@ var effects = {
                        return 1;
                }
                if (!p) {
-                       p = 1 * 0.3;
+                       p = 0.3;
                }
-               if (a < Math.abs(1)) {
+               if (a < 1) {
                        a = 1;
                        s = p / 4;
                } else {
@@ -175,9 +175,9 @@ var effects = {
                        return 1;
                }
                if (!p) {
-                       p = 0.3 * 1.5;
+                       p = 0.45;
                }
-               if (a < Math.abs(1)) {
+               if (a < 1) {
                        a = 1;
                        s = p / 4;
                } else {