1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-19 14:48:07 +00:00

network sniffer

This commit is contained in:
kepler155c@gmail.com
2019-02-23 18:36:17 -05:00
parent 1c859029f1
commit 8ae3b33374
5 changed files with 81 additions and 13 deletions

View File

@@ -119,14 +119,8 @@ function Util.signum(num)
end
end
function Util.clamp(lo, num, hi)
if num <= lo then
return lo
elseif num >= hi then
return hi
else
return num
end
function Util.clamp(num, low, high)
return num < low and low or num > high and high or num
end
-- http://lua-users.org/wiki/SimpleRound