Re: Rounding x to y decimal places (was Re: Int Function
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.