I'm creating a simple thing that calculates values based around money. It works perfectly but sometimes you'll get a thing where it's $33/$99 or so, and makes it a third of the value, spitting out things like $33.3333333333 or $66.6666666666667 etc. Same thing with percentages.
How would I round these values up so it only has two decimal places? And in the case of percentages, no decimal places?
Develop games in your browser. Powerful, performant & highly capable.
Round(Value/100)*100 will return:
For value being 33.33333333333, it will return 33.33
for 66.666666666, it will return 66.67
for 10.50, it will return 10.5
Round(value) will returnthe value rounded to the nearest integer.