This is probably a really newbie question (well, I'm pretty sure it is), but I have a float that's being returned and I need a quick and efficient way of turning it into an int.
Pretty simple, but I have an exception. If the remainder of the float is anything other than .0 then I want to increment the int.
Some quick examples:
Float = 98.0, Int = 98
Float = 98.1, Int = 99
Float = 6.6, Int = 7
etc.
This should do it:
Use
as Math.Round() won't make 98.1 equal to 99