js-combinatorics
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -22,11 +22,6 @@ /* | ||
'use strict'; | ||
var version = "0.5.1"; | ||
var version = "0.5.2"; | ||
/* combinatory arithmetics */ | ||
var P = function(m, n) { | ||
var t, p = 1; | ||
if (m < n) { | ||
t = m; | ||
m = n; | ||
n = t; | ||
} | ||
var p = 1; | ||
while (n--) p *= m--; | ||
@@ -36,2 +31,5 @@ return p; | ||
var C = function(m, n) { | ||
if (n > m) { | ||
return 0; | ||
} | ||
return P(m, n) / P(n, n); | ||
@@ -38,0 +36,0 @@ }; |
Package.describe({ | ||
name: 'jandres:js-combinatorics', | ||
version: '0.5.1', | ||
version: '0.5.2', | ||
// Brief, one-line summary of the package. | ||
@@ -5,0 +5,0 @@ summary: 'power set, combination, permutation and more in JavaScript', |
{ | ||
"name": "js-combinatorics", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "Simple combinatorics like power set, combination, and permutation in JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "combinatorics.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57679
16
1676