ralphtrent
Programmer
Hello
I am looking for a way to return the whole number only after doing a division.
Example 1905/60 = 31.75, I want to return only the 31. How can I do this?
I have tried
I need to keep the exactly number, no rounding. What I have done temporarily was this
Is there a System.Math method I can use to avoid converting to a string?
Thanks.
I am looking for a way to return the whole number only after doing a division.
Example 1905/60 = 31.75, I want to return only the 31. How can I do this?
I have tried
Code:
Math.Round(31.75) [green]//returns 32[/green]
Code:
(1905/60).ToString().Split('.')[0]; [green]//returns 31[/green]
Is there a System.Math method I can use to avoid converting to a string?
Thanks.