L
Luigi Z
Hi all,
how can I write a method that returns a rounded decimal like these rules?
0.49 -> 0
0.50 -> 0
0.51 -> 1
and so on for positive values
-0.49 -> 0
-0.50 -> 0
-0.51 -> -1
and so on for negative values.
Thanks in advance.
Luigi
how can I write a method that returns a rounded decimal like these rules?
0.49 -> 0
0.50 -> 0
0.51 -> 1
and so on for positive values
-0.49 -> 0
-0.50 -> 0
-0.51 -> -1
and so on for negative values.
Thanks in advance.
Luigi