0
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
Copy link to clipboard
Copied
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?
TOPICS
Actions and scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
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
Copy link to clipboard
Copied
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 guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
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
Copy link to clipboard
Copied
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 guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
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
Copy link to clipboard
Copied
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 guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guru
,
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096311#M447861
Jan 17, 2009
Jan 17, 2009
Copy link to clipboard
Copied
var x = 0.235
Math.asin( x )*(180/Math.PI)
Math.asin( x )*(180/Math.PI)
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
c.pfaffenbichler
AUTHOR
Community Expert
,
LATEST
/t5/photoshop-ecosystem-discussions/how-to-get-sin-1-arc-sine-in-javascript/m-p/1096312#M447862
Jan 17, 2009
Jan 17, 2009
Copy link to clipboard
Copied
Thanks!
Youve helped me a lot!
Have a great weekend
Pfaffenbichler
Youve helped me a lot!
Have a great weekend
Pfaffenbichler
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

