From 4fc0a92dbee54b949a1ba53f8f056517bbf27dd7 Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Sat, 7 Sep 2024 08:48:12 -0700 Subject: [PATCH] meh --- pack-wav.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pack-wav.js b/pack-wav.js index 50379a0..9e87df9 100644 --- a/pack-wav.js +++ b/pack-wav.js @@ -20,7 +20,7 @@ class Dither { } to4bit(val8) { - let val = (val8 / 255) - this.err; + let val = (val8 / 255) + this.err; if (val < 0) { val = 0; } @@ -29,7 +29,7 @@ class Dither { } let val4 = Math.round(val * 15); let dithered = (val4 / 15); - this.err = (dithered - val); + this.err = (val - dithered); return val4; } }