how to get sin-1/arc sine in javascript
Community Expert
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/td-p/1096307
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
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?
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?
THEMEN
Aktionen und Skripte
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen
Entdecken Sie verwandte Tutorials und Artikel
Community Expert
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096308#M447858
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
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
For more info about JS's Math Object, look here:
http://w3schools.com/jsref/jsref_obj_math.asp
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen
c.pfaffenbichler
AUTOR
Community Expert
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096309#M447859
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
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?
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?
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen
Community Expert
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096310#M447860
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
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).
To convert from radians to degrees you need to multiply by 180/π (which is about 57.2958).
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen
Guru
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096311#M447861
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
var x = 0.235
Math.asin( x )*(180/Math.PI)
Math.asin( x )*(180/Math.PI)
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen
c.pfaffenbichler
AUTOR
Community Expert
,
AKTUELL
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096312#M447862
Jan 17, 2009
Jan 17, 2009
Link in Zwischenablage kopieren
Kopiert
Thanks!
Youve helped me a lot!
Have a great weekend
Pfaffenbichler
Youve helped me a lot!
Have a great weekend
Pfaffenbichler
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten.
Weitere Informationen

