Possible Duplicate:
Why does Math.Floor(Double) return a value of type Double?
Why does C# Math.Floor()
return double
instead of int
From the MSDN Docs:
Returns the largest integer less than or equal to the specified double-precision floating-point number
it says it returns an integer. Its ok to return a double
, I can always cast it to an int
but its just quite strange, isn't it?