Login  Register

Re: ceiling function

Posted by dscho on Aug 07, 2011; 11:15am
URL: http://imagej.273.s1.nabble.com/ceiling-function-tp3683582p3683588.html

Hi,

On Sun, 7 Aug 2011, Albert Cardona wrote:

> 2011/8/7 Wes Armour <[hidden email]>:
> >
> > I am writing an imagej macro. In it I need to round up to the nearest
> > integer e.g. 2.1 -> 3 Normally this can be done with the ceiling
> > function, is there a function like this in imagej macro language??
> > I've found round and floor, but no ceil.
>
> So you could add 1 and then call floor ?

Or -floor(-x).

Ciao,
Dscho