JSA -- now I believe this is a bug (JSA or AS)
JSA -- now I believe this is a bug (JSA or AS)
- Subject: JSA -- now I believe this is a bug (JSA or AS)
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 17 Dec 2014 21:17:05 -0500
This:
Math.tan((Math.PI)/3)
—> 1.7320508075688767 (sqrt(3))
Is correct when run from JSA
This is not:
set k to run script "Math.tan((Math.PI)/3)" in “Javascript”
k
(*
tell current application
run script "Math.tan((Math.PI)/3)" in "Javascript"
end tell
Result:
1
*)
the problem happens with all trig functions.
No, it does not work with degrees either
set k to run script "Math.tan(45)" in "Javascript”
k
—> 1
"Great! It works"
set k to run script "Math.tan(30)" in "Javascript”
k
—> -6
Nah, it doesn’t!!
Other functions seem to work. The ones that “don’t do elaborate calculations"
Math.ln() seems to truncate the result to integer
The functions work correctly on the JSA side
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden