markzzz - 1 year ago 96

C# Question

I have a number ("double") from int/int (such as 10/3).

What's the best way to Approximation by Excess and convert it to int on C#?

Answer Source

Are you asking about System.Math.Ceiling?

```
Math.Ceiling(0.2) == 1
Math.Ceiling(0.8) == 1
Math.Ceiling(2.6) == 3
Math.Ceiling(-1.4) == -1
```