mirror of
https://github.com/pvpgn/pvpgn-server
synced 2026-08-24 18:23:04 -04:00
16 lines
No EOL
389 B
Lua
16 lines
No EOL
389 B
Lua
--[[
|
|
Copyright (C) 2014 HarpyWar (harpywar@gmail.com)
|
|
|
|
This file is a part of the PvPGN Project http://pvpgn.pro
|
|
Licensed under the same terms as Lua itself.
|
|
]]--
|
|
|
|
|
|
-- return rounded float value
|
|
function math.round(num, idp)
|
|
local mult = 10^(idp or 0)
|
|
return math.floor(num * mult + 0.5) / mult
|
|
end
|
|
|
|
function math.isnan(x) return x ~= x end
|
|
function math.isinf(x) return (x+1)==x end |