Advertisement
nelsonlombardo

Fixed Decimals

Jul 17th, 2013
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.09 KB | None | 0 0
  1. function round2(num, idp)
  2.   return tonumber(string.format("%." .. (idp or 0) .. "f", num))
  3. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement