• 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: Rounding x to y decimal places (was Re: Int Function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rounding x to y decimal places (was Re: Int Function


  • Subject: Re: Rounding x to y decimal places (was Re: Int Function
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 19 Aug 2002 13:59:38 +0100

Timothy Bates wrote on Mon, 19 Aug 2002 13:58:22 +1000:

>> From: Christopher Nebel <email@hidden>
>> I tend to prefer "round" because it makes the intent more clear, and
>> it's more flexible -- you can use different rounding modes without
>> adding a lot of code that doesn't come naturally to non-numerics folk.
>> (Consider how many times people here have asked how to round a number
>> to n decimal places.)
>
>But round doesn't do this...
>It would be nice to have "decimal places" optional parameter [default = 0]
>
>round pi decimal places 4
>-->3.141

My fast - and, moreover, free :-) - rounding handlers can be download
from the Scriptbuilders Web site. They're tons faster than 'round',
include handlers for rounding to a given number of decimal places, and
contain some defence against known problem numbers.


http://files.macscripter.net/ScriptBuilders/ScriptTools/aRounderRound.sit

NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: getting a file list in sorted order
  • Next by Date: Re: Rounding x to y decimal places (was Re: Int Function
  • Previous by thread: Re: Interesting observation in OS X scripts menu
  • Next by thread: Re: Rounding x to y decimal places (was Re: Int Function
  • Index(es):
    • Date
    • Thread