• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to coerce a real to an integer in X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
**********************************


  • Prev by Date: Re: OO Theory misconceptions (was Re: can I make a list of
  • Next by Date: OS X: AS 1.8.2b1: ask System Events for a running process
  • Previous by thread: Re: How to coerce a real to an integer in X?
  • Next by thread: Re: issues with non-ASCII characters vs. "do shell script"
  • Index(es):
    • Date
    • Thread