I have Googled for it and found some interesting answers:
My problem was solved by simple using on Math.Ceiling
And other interesting answers are :
My problem was solved by simple using on Math.Ceiling
var wholeNumber = (int)Math.Ceiling(fractionalNumber);
And other interesting answers are :
Math.Ceiling
always rounds up (towards the ceiling)
Math.Floor
always rounds down (towards to floor)
References :
No comments:
Post a Comment