Is there a way to find the ceiling or floor of a float for example

4.5 -> 4 for floor

4.5 -> 5 for ceiling

Printable View

- 10-13-2011, 06:22 AMteardrop3903Ceiling and Floor without using Math class
Is there a way to find the ceiling or floor of a float for example

4.5 -> 4 for floor

4.5 -> 5 for ceiling - 10-13-2011, 06:29 AMpbrockway2Re: Ceiling and Floor without using Math class
I'm guessing this is for an assignment (otherwise the no Math is a weird requirement). You could peek at the Math.java source. Or consider what

*foo*%1 is when*foo*is a floating point type.