Re: How to coerce a real to an integer in X?
Re: How to coerce a real to an integer in X?
- Subject: Re: How to coerce a real to an integer in X?
- From: Kai Edwards <email@hidden>
- Date: Sat, 02 Feb 2002 14:07:29 +0100
>
Date: Fri, 1 Feb 2002 21:10:44 +0000
>
To: email@hidden
>
From: has <email@hidden>
>
Subject: Re: How to coerce a real to an integer in X?
>
>
ThePPCGod wrote:
>
>
> -- if you want it to round up and down; omit this line to just round
>
> down.
>
> set x to x + 0.5
>
> set x to (round (x) rounding down)
>
>
How about 'x div 1' to round down? Should be quicker than using 'round' (an
>
osax call).
About 11 times quicker here.
Kai
--
**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************