From b4f97bec617d3729f77dc385a73e2934b9ca9649 Mon Sep 17 00:00:00 2001 From: Gael-de-Sailly Date: Sun, 20 Dec 2020 18:11:11 +0100 Subject: [PATCH] =?UTF-8?q?For=20noise=20map=20seed:=20don't=20go=20over?= =?UTF-8?q?=20=C2=B14096,=20to=20prevent=20rounding=20errors=20on=20coordi?= =?UTF-8?q?nates=20(because=20noise=20library=20uses=2032-bit=20floats)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate.py b/generate.py index 03a4653..19b7aa8 100755 --- a/generate.py +++ b/generate.py @@ -81,8 +81,8 @@ params = { } # Determine noise offset randomly -xbase = np.random.randint(65536) -ybase = np.random.randint(65536) +xbase = np.random.randint(8192)-4096 +ybase = np.random.randint(8192)-4096 # Generate the noise for x in range(mapsize+1):