So, yeah. I need to round to a number about 2 or three decimal places (i’m working with CurTime(), which spews out a huge string of numbers, and comparing it to another CurTime(): inconsistencies mean they never match). Math.Round is too simple, since i’m working a window of .45.

Any suggestions?

Very old thread, but it helps you with your problem.

http://www.facepunch.com/showthread.php?t=249562

Multiply by x. Math.Round it. Divide by x.

(Where x is an exponent of 10. i.e. 10, 100, 1000, etc.)

[lua]

function math.floor10(number, digits)

return math.floor(number*10^digits)/10^digits
end
function math.round10(number, digits)
return math.floor(number*10^digits+0.5)/10^digits

end

[/lua]