• 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: Taking into account negative numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Taking into account negative numbers


  • Subject: Re: Taking into account negative numbers
  • From: email@hidden
  • Date: Tue, 25 Jun 2002 12:18:25 +0100

Either I've missed something or you're making this extremely complicated
for no reason

0 is not a number and is neither negative or positive. However, anything
less than zero is a negative number. Therefore

If x<0 then set y to x* -1

will turn negative numbers into positive numbers.

Therefore:

set tolerance to 0.5
set variance to Value1-Value2
if variance<0 then set variance to variance *-1
if variance>tolerance then do error_stuff


HTH
Steve
_______________________________________________
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: Taking into account negative numbers
  • Next by Date: Re: Taking into account negative numbers
  • Previous by thread: Re: Taking into account negative numbers
  • Next by thread: Re: Taking into account negative numbers
  • Index(es):
    • Date
    • Thread