mirror of
https://github.com/HybridDog/nether-pack.git
synced 2024-12-26 02:30:24 +01:00
further optimazion of ws func
This commit is contained in:
parent
f3cec2fe06
commit
780b95bfbc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user