Re: TIB: Re:
[Prev][Next][Index][Thread]
Re: TIB: Re:
GrafixxHQ wrote:
>
> >This is kind of related but how do you use int so it goes up?
> >like 1.2 returns 2.
>
> For this, add .9 to the number and then use int, or another number if you want
> to round up from a certain number (e.g. round up from 1.0000001, then add
> 0.9999999.
>
> If you want it to round up past the .5, add .5 to the number and use int
>
> int(VarName +.5) ;I don't know if this is how you use int for the 83, but
> you get the picture, right :-)
Int is identical to floor. The opposite function is (intuitively)
ceiling.
Ceiling will do just so: return the smallest integer that is greater
than, or equal to, the input, e.g. 1.2 will return 2, and specifically,
-1.2 will return -1.
HTH. HAND.
--
Rene Kragh Pedersen
------------------------------------------------------------------
Apparently my clothes are defective.
- Dilbert.
References:
- TIB: Re:
- From: GrafixxHQ <GrafixxHQ@aol.com>