1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2024-12-25 18:20:23 +01:00

further optimazion of ws func

This commit is contained in:
HybridDog 2016-05-04 17:43:37 +02:00
parent f3cec2fe06
commit 780b95bfbc

View File

@ -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