[Pkg-javascript-commits] [science.js] 74/87: Slightly cleaner.

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:12:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository science.js.

commit 0dbed1b4cd5c422526a0174195d11f1cd029358b
Author: Jason Davies <jason at jasondavies.com>
Date:   Mon Dec 17 13:23:26 2012 +0000

    Slightly cleaner.
---
 science.v1.js     | 2 +-
 science.v1.min.js | 2 +-
 src/stats/mode.js | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/science.v1.js b/science.v1.js
index 8c072d2..cb39410 100644
--- a/science.v1.js
+++ b/science.v1.js
@@ -1644,7 +1644,7 @@ science.stats.mode = function(x) {
       mode = [d];
     }
   }
-  return mode.length === 1 ? mode[0] : void 0;
+  if (mode.length === 1) return mode[0];
 };
 // Uses R's quantile algorithm type=7.
 science.stats.quantiles = function(d, quantiles) {
diff --git a/science.v1.min.js b/science.v1.min.js
index e7744fe..fcea727 100644
--- a/science.v1.min.js
+++ b/science.v1.min.js
@@ -1 +1 @@
-(function(a){(function(a){science={version:"1.9.1"},science.ascending=function(a,b){return a-b},science.EULER=.5772156649015329,science.expm1=function(a){return a<1e-5&&a>-0.00001?a+.5*a*a:Math.exp(a)-1},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.quadratic=function(){function b(b,c,d){var e=c*c-4*b*d;return e>0?(e=Math.s [...]
\ No newline at end of file
+(function(a){(function(a){science={version:"1.9.1"},science.ascending=function(a,b){return a-b},science.EULER=.5772156649015329,science.expm1=function(a){return a<1e-5&&a>-0.00001?a+.5*a*a:Math.exp(a)-1},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.quadratic=function(){function b(b,c,d){var e=c*c-4*b*d;return e>0?(e=Math.s [...]
\ No newline at end of file
diff --git a/src/stats/mode.js b/src/stats/mode.js
index 6a37711..b2d161f 100644
--- a/src/stats/mode.js
+++ b/src/stats/mode.js
@@ -14,5 +14,5 @@ science.stats.mode = function(x) {
       mode = [d];
     }
   }
-  return mode.length === 1 ? mode[0] : void 0;
+  if (mode.length === 1) return mode[0];
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/science.js.git



More information about the Pkg-javascript-commits mailing list