Browse Source

changed rounding function, results now more consistent with existing wav2sketch

dds
Matt Bradshaw 6 years ago
parent
commit
5232355994
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      extras/wav2sketch/wav2sketch.js

+ 2
- 1
extras/wav2sketch/wav2sketch.js View File

@@ -75,7 +75,8 @@ function processFile(file, fileName) {
// http://2ality.com/2012/02/js-integers.html
function toInteger(x) {
x = Number(x);
return x < 0 ? Math.ceil(x) : Math.floor(x);
return Math.round(x);
//return x < 0 ? Math.ceil(x) : Math.floor(x);
}

function modulo(a, b) {

Loading…
Cancel
Save