• 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: Currency Numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Currency Numbers
      • From: Emmanuel <email@hidden>
References: 
 >Re: Currency Numbers (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Currency Numbers
  • Next by Date: Intel UI scripting
  • Previous by thread: Re: Currency Numbers
  • Next by thread: Re: Currency Numbers
  • Index(es):
    • Date
    • Thread