total-serialism
Advanced tools
Comparing version 1.7.2 to 1.7.3
{ | ||
"name": "total-serialism", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "A set of methods for the generation and transformation of number sequences useful in algorithmic composition", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,3 +31,3 @@ //========================================================================== | ||
for (var i=0; i<len; i++){ | ||
arr[i] = (i * (1/len)) * (hi - lo) + lo; | ||
arr[i] = (i / len) * (hi - lo) + lo; | ||
} | ||
@@ -67,3 +67,3 @@ return arr; | ||
var arr = spreadFloat(len, lo, hi); | ||
return arr.map(v => Math.floor(v)); | ||
return arr.map(v => Math.floor(Number(v.toPrecision(15)))); | ||
} | ||
@@ -79,3 +79,3 @@ exports.spread = spread; | ||
var arr = spreadFloatExp(len, lo, hi, exp); | ||
return arr.map(v => Math.floor(v)); | ||
return arr.map(v => Math.floor(Number(v.toPrecision(15)))); | ||
} | ||
@@ -130,3 +130,3 @@ exports.spreadExp = spreadExp; | ||
var arr = spreadInclusiveFloat(len, lo, hi); | ||
return arr.map(v => Math.floor(v)); | ||
return arr.map(v => Math.floor(Number(v.toPrecision(15)))); | ||
} | ||
@@ -143,3 +143,3 @@ exports.spreadInclusive = spreadInclusive; | ||
var arr = spreadInclusiveFloatExp(len, lo, hi, exp); | ||
return arr.map(v => Math.floor(v)); | ||
return arr.map(v => Math.floor(Number(v.toPrecision(15)))); | ||
} | ||
@@ -146,0 +146,0 @@ exports.spreadInclusiveExp = spreadInclusiveExp; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1464628