I do see following description (in docs) for the function Math.ceil(double a):
Returns the smallest (closest to negative infinity) double value that
is greater than or equal to the argument and is equal to a
mathematical integer.
Do I something miss or it is incorrect in here "Returns the smallest (closest to negative infinity)"?
I mean, when you do use it, whatever not zero number there will be after decimal point, it will always be upped in positive direction, not negative (so it returns closest to positive infinity).
>Solution :
What you are saying is right. The definition mentioned is wrong. It returns the number in the positive direction. for example, math.ceil(4.7) would return 5