In C#, how do I round a float upwards to the nearest int?
I see Math.Ceiling and Math.Round, but these returns a decimal. Do I use one of these then cast to an Int?<
Do I use one of these then cast to an Int?
Yes. There is no problem doing that. Decimals and doubles can represent integers exactly, so there will be no representation error. (You won't get a case, for instance, where Round returns 4.999... instead of 5.)