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
#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


Messages In This Thread
RE: Math round with 2 decimal points - by admin - 04.07.2024, 09:23

Forum Jump: