Why does Math.Floor(Double) return a value of type Double?
The range of double is much wider than the range of int or long. Consider this code: double d = 100000000000000000000d; long x = Math.Floor(d); // Invalid in reality The integer is outside the range of long – so what would you expect to happen? Typically you know that the value will actually be within … Read more