Approximation
23 Nov 2012, 12:23
How do I round-up numbers in a code.
(Math.Round) obviously does not work.
Thanks
Approximation
23 Nov 2012, 12:23
How do I round-up numbers in a code.
(Math.Round) obviously does not work.
Thanks
admin
23 Nov 2012, 12:42
Can you type the syntax you are using and the desired outcome. Math.Round has a few overloads:
var a = Math.Round(7.45); var b = Math.Round(7.45, 1); var c = Math.Round(7.45, 2); Print("{0},{1},{2}", a,b,c);Output:
7, 7.4, 7.45
@admin