From 286eef7385871a83fe2591bb4bf9db93ff6960f8 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 28 Oct 2017 00:52:33 +0000 Subject: [PATCH] Fix --- util/Util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/Util.js b/util/Util.js index c6da8657..cf6d8d13 100644 --- a/util/Util.js +++ b/util/Util.js @@ -108,8 +108,8 @@ class Util { const stride = width * strideLevel; for (let i = 0; i < width; i++) { for (let j = 0; j < height; j++) { - const xs = Math.round(amplitude * Math.sin(2 * Math.PI * 3 * (y / height))); - const ys = Math.round(amplitude * Math.cos(2 * Math.PI * 3 * (x / width))); + const xs = Math.round(amplitude * Math.sin(2 * Math.PI * 3 * (j / height))); + const ys = Math.round(amplitude * Math.cos(2 * Math.PI * 3 * (i / width))); const dest = (j * stride) + (i * strideLevel); const src = (j + ys) * (stride + (i + xs)) * strideLevel; data.data[dest] = temp.data[src];