Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)



On Mar 8, 2005, at 10:03, Mark Lively wrote:

On Mar 8, 2005, at 10:52 AM, jj wrote:

Hi, is in AppleScript not ABS function?

TIA, AAAA, Ronald
=======================================

Do you mean "Antilock Braking System" or "Adult Basic Skills"?


Absolute Value.

IIRC out of the box no. I know there are several scripting additions that do it.

It's only a few instructions, so writing a script-based version wouldn't much more overhead than a scripting addition-based version (I would think).


on abs(x)
	if x < 0 then return 0 - x
	return x
end abs

Or return x * -1. I don't know which is faster or more accurate when dealing with floats.

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >Re: (no subject) (From: jj <email@hidden>)
 >Re: (no subject) (From: Mark Lively <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.