mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-27 18:11:20 +00:00
Update lib/extramath.js
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
83b022bf6f
commit
1dd02f7a75
|
|
@ -73,7 +73,7 @@ function cartesianProduct(arr) {
|
|||
function clusteredCellsDensity(numbers, size, minDensity) {
|
||||
if (!numbers || !numbers.length) return false;
|
||||
if (typeof size !== 'number' || size <= 0) size = 4; // default grid size = 4
|
||||
if (typeof minDensity === 'undefined') minDensity = 0.6;
|
||||
if (typeof minDensity !== 'number' || isNaN(minDensity)) minDensity = 0.6;
|
||||
|
||||
var maxIndex = size * size; // because it's 1-based (1..size*size)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user