Every time I use Math.Round/Floor/Ceiling I always cast to int (or perhaps long if necessary). Why exactly do they return double if it’s always returning an integer.
Every time I use Math.Round/Floor/Ceiling I always cast to int (or perhaps long if
Share
The result might not fit into an int (or a long). The range of a double is much greater.
Approximate range of double: ±5.0 × 10−324 to ±1.7 × 10308
(Source)