In groovy if i have the code like this :
def num = 9
println mum/4
which outputs 2.25. But what I want is whenever I get a decimal like this I need that number to rounded to next int number in our case it should be 3. For example, if the result is 3.01 i need the output as 4. Can anyone say me how to do this in groovy?
You want the ceiling function. I believe it is
Math.ceil.