"Max Bian" <[EMAIL PROTECTED]> wrote in message news:72156@palm-dev-forum...
>
> Are you using mathlib?
>
> I haven't used float in Palm.
>
> For all integer solution:
>
> UInt16 num = 212, or other number;
> UInt16 div = 20;
> UInt16 result;
>
> result = (num/div) + ((num % div)*2 < div)?0:1);

or result = (num + div << 1) / div;

>
> Max
>
> --- Johnathan Smith <[EMAIL PROTECTED]> wrote:
> > if I do 212 / 20 I would like my out come to be 11.  I
> > am getting 10.6.
> >
> >  How can I make all number greater then .5 round up
> > and all numbers less then .5 round down??
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send your FREE holiday greetings online!
> > http://greetings.yahoo.com
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
please
> > see http://www.palmos.com/dev/tech/support/forums/
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to