Reputation: 888
This gives me the answer in degrees but I want the answer in Radians for Inverse Cosine. For example if I pick 0.5 for invCosineVal it will return 60 deg but not sure how I can find the answer in Radians which should be 1.047.
ans = Math.acos(invCosineVal) * (180/Math.PI);
Upvotes: 4
Views: 18615
Reputation: 4567
ans = Math.acos(invCosineVal)
There you go, 180/Math.PI converts it to degrees
Upvotes: 18