further optimazion of ws func

This commit is contained in:
HybridDog 2016-05-04 17:43:37 +02:00
parent f3cec2fe06
commit 780b95bfbc
1 changed files with 2 additions and 2 deletions

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