Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

how to get sin-1/arc sine in javascript

Community Expert ,
Jan 17, 2009 Jan 17, 2009
This time I ask doubly humbled because not only am I weak in JavaScript but Ive come to realize that Ive gotten pretty bad at mathematics  
On my calculator the key »sin-1« (sinus to the power of negative one) gets me the angle in degrees if I enter the value I get by dividing the opposite side by the hypothenuse (of a right triangle naturally), but I cant figure out how to achieve that in JavaScript.
The calculator-key signifies the arc sine, which the function Math.asin() should also provide but I dont seem to get meaningful results, instead the result looks like what on my calculator is called the hyperbolic sine.
Could someone please help me out here Script- and/or math-wise?
TOPICS
Actions and scripting
4.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jan 17, 2009 Jan 17, 2009
Math.asin(x) will solve your problem.

For more info about JS's Math Object, look here:
http://w3schools.com/jsref/jsref_obj_math.asp
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2009 Jan 17, 2009
Thanks for the reply, but that doesnt help me.
I need the angle (for example for 0.235 I would like the reply of 13.6) and
Math.asin(0.235);
gets me the result »0.23721856«.
Do I make some mistake or do I have to process that result further? If so, how?
Like I said, my math-skills have seriously deteriorated, but its just a keystroke on the calculator

Edit: Could the calculator-people use the term arc sine based on another definition?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2009 Jan 17, 2009
The result is in radians. 0.2372 radians is 13.6 degrees.
To convert from radians to degrees you need to multiply by 180/π (which is about 57.2958).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 17, 2009 Jan 17, 2009
var x = 0.235
Math.asin( x )*(180/Math.PI)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2009 Jan 17, 2009
LATEST
Thanks!
Youve helped me a lot!

Have a great weekend
Pfaffenbichler
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines