From 780b95bfbc6e0898a2db4fb086949f0bbaca45c0 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Wed, 4 May 2016 17:43:37 +0200 Subject: [PATCH] further optimazion of ws func --- nether/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nether/init.lua b/nether/init.lua index f2c13c5..14c281c 100644 --- a/nether/init.lua +++ b/nether/init.lua @@ -134,10 +134,10 @@ end local SIZE = 1000 local ssize = math.ceil(math.abs(SIZE)) local function do_ws_func(depth, a, x) - local n = x/(16*SIZE) + local n = math.pi * x / (16 * SIZE) local y = 0 for k=1,depth do - y = y + math.sin(math.pi * k^a * n)/(k^a) + y = y + math.sin(k^a * n) / k^a end return SIZE*y/math.pi end