Le 18/12/2014 à 15:21, Deivy Petrescu <
email@hidden> a écrit :
On Dec 18, 2014, at 24:35 , Shane Stanley <email@hidden> wrote:
On 18 Dec 2014, at 4:30 pm, Deivy Petrescu <email@hidden> wrote:
That's not the same thing as calling "run script" from AppleScript.
Yes, it is, in JSA is “runScript”.
You're missing my point. It's "equivalent", but it's not "the same". You're skipping the overhead of calling out from AppleScript to JXA, and returning the result to AppleScript. That's what was being timed earlier.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
Got you now.
However, it would not be a problem, a call to any of these functions would be a lone call or one of very few.
My only goal is to skip adding sines, cosines, etc in the library.
I know Smile has all these functions and an excellent way to do vector computation and "higher Math”, if you will.
But nor many people use Smile. Unfortunately.
And some of the functions in the library are not in any other application.
Cosines and sines, and all the transcendental functions are "computationally intensive” if you start from scratch.
Not having to include them, would be a time saver and would also avoid some possible name space conflicts (these calla are unnecessary if you are using JSA).
Deivy Petrescu
email@hidden
Maybe you would be interested to learn that Shane Stanley's ASObjCExtras.framework offer some mathematical functions :
+ (id)tanValueOf:(id)listOrNumber;
+ (id)sinValueOf:(id)listOrNumber;
+ (id)cosValueOf:(id)listOrNumber;
+ (id)atanValueOf:(id)listOrNumber;
+ (id)asinValueOf:(id)listOrNumber;
+ (id)acosValueOf:(id)listOrNumber;
+ (id)tanhValueOf:(id)listOrNumber;
+ (id)sinhValueOf:(id)listOrNumber;
+ (id)coshValueOf:(id)listOrNumber;
+ (id)atanhValueOf:(id)listOrNumber;
+ (id)asinhValueOf:(id)listOrNumber;
+ (id)acoshValueOf:(id)listOrNumber;
+ (id)logValueOf:(id)listOrNumber;
+ (id)log10ValueOf:(id)listOrNumber;
Yvan KOENIG (VALLAURIS, France) jeudi 18 décembre 2014 15:52:42