Login  Register

Re: division returning an integer

Posted by Mikhail Umorin on Sep 05, 2005; 4:31pm
URL: http://imagej.273.s1.nabble.com/division-returning-an-integer-tp3704919p3704921.html

int a = 45/2; // ("//" means comment) = 22

this is a feature of Java that when you divide two integers and assign the
result to an integer it performs integer division

On Monday 05 September 2005 10:12, Rafael Carazo-Salas wrote:

> Hi all a VERY very basic question .  How can I perform a division that
> will return to me the integer result of it for example return 22 when I
> divide 45 by 2 and where can I find a manual that answers this sort of
> reall basic questions for ImageJ ?  Thank you in advance .
>
>
>
>
>
> Rafael