# Math.Ceil ??

Srinivasa Raghavan

Ranch Hand

Posts: 1228

Horatio Westock

Ranch Hand

Posts: 221

Nigel Browne

Ranch Hand

Posts: 703

posted 11 years ago

If you read the api the method Math.ceil has the following signature :

However when you divide 15/8 you return an int, if you divide 15.0/8.0 you are using a floating point hence the the answer will be a double and the Math.ceil method will function as required.

[ March 17, 2005: Message edited by: Nigel Browne ]

public static double ceil(double a)

However when you divide 15/8 you return an int, if you divide 15.0/8.0 you are using a floating point hence the the answer will be a double and the Math.ceil method will function as required.

[ March 17, 2005: Message edited by: Nigel Browne ]