This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Math round with 2 decimal points
#1
Hi,
It's possible with scripts to do a math.round with 2 decimal points ? 

best regards.
Reply
#2
Two solutions:
Code:
value = 1.235

numvalue = math.round(value, 2) -- numeric value that can be used in further calculations
strvalue = string.format('%.2f', value) -- string value
Reply


Forum Jump: