0

[answered] How to calculate alpha with Math.asin()?

I searched in the internet and I found out that in a right-angle triangle alpha = arcsin(a/c) and in JavaScript you calculate arcsin with Math.asin(). But this function doesn't return an angle in degrees and I don't know how to turn it into an angle. (This is the code I need it for: https://code.sololearn.com/W0IBhkkc8cet/?ref=app, line 27)

26th Dec 2019, 12:39 PM
C. Scheler
C. Scheler - avatar
1 Resposta
+ 1
alpha = arcsin(a/c) will give you the result in radians. To convert this to degree, you have to multiply it by 180/Pi alpha_deg = alpha_rad *180/Pi https://m.wikihow.com/Convert-Radians-to-Degrees
26th Dec 2019, 2:51 PM
Coding Cat
Coding Cat - avatar