Re: Currency Numbers
Re: Currency Numbers
- Subject: Re: Currency Numbers
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 21 Jun 2006 20:45:26 -0700
- Thread-topic: Currency Numbers
On 6/21/06 8:38 PM, "Paul Berkowitz" <email@hidden> wrote:
> here's an alternative to
>
> (y ^ 2) ^ 0.5
>
> to get the absolute value of a number. Just for the hell of it. ;-)
>
>
> (-((y < 0) as integer) * y) + (((y > 0) as integer) * y)
Here's a neater way to write that:
y * (((y > 0) as integer) - ((y < 0) as integer))
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden