mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-25 16:53:46 +01:00
Add negative and positive nan constants to math
This commit is contained in:
parent
4f59279591
commit
26de548e32
3
math.lua
3
math.lua
@ -9,6 +9,9 @@ setfenv(1, _ENV)
|
||||
math.randomseed(minetest and minetest.get_us_time() or os.time() + os.clock())
|
||||
for _ = 1, 100 do math.random() end
|
||||
|
||||
negative_nan = 0/0
|
||||
positive_nan = negative_nan ^ 1
|
||||
|
||||
function round(number, steps)
|
||||
steps = steps or 1
|
||||
return math.floor(number * steps + 0.5) / steps
|
||||
|
Loading…
Reference in New Issue
Block a user