0

On my calculator I typed in 90-sin^-1(Y/X)

Y=6, X=9

I was returned with approximately:

48.71 degrees (which I expected)

But on java it returns:

0.72

I was told to use asin on java... Is that correct?

2 Answers2

0

trigonometric functions in programming languages return a value measured in radians. you need to convert to degrees like below.

degrees=radians*180/PI

flo_badea
  • 774
  • 5
  • 8
0

Yes, the asin method is correct for that.

The result from asin is in radians, so you need to convert it to degrees:

double angle = 90 - Math.toDegrees(Math.asin(Y / X));
Guffa
  • 687,336
  • 108
  • 737
  • 1,005