From fe7664275276b8e9f4fc012c5099c2f5b0bd768a Mon Sep 17 00:00:00 2001 From: Fenyx4 Date: Wed, 27 Jan 2021 00:34:46 -0600 Subject: [PATCH] Stop it from repeating itself in the Y I was translating this to C# and noticed that it was repeating itself in the Y. I don't know if that was on purpose for this repository. If it was ignore this PR. --- src/simplexnoise.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simplexnoise.cpp b/src/simplexnoise.cpp index fa7331d..8386c96 100644 --- a/src/simplexnoise.cpp +++ b/src/simplexnoise.cpp @@ -550,7 +550,7 @@ int simplexnoise(int32_t seed, float* map, int width, int height, float persiste float fNX = x * inv_width; // we let the x-offset define the circle float fNY = y * inv_height; // we let the x-offset define the circle float fRdx = (float)(fNX * 2 * PI); // a full circle is two pi radians - float fRdy = (float)(fNY * 4 * PI); // a full circle is two pi radians + float fRdy = (float)(fNY * 2 * PI); // a full circle is two pi radians float a = sinf(fRdx); float b = cosf(fRdx); float c = sinf(fRdy);