Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

hey so i'm programming something that finds an angle of a line between 0 and 180 degrees based on two points....

the equation to find the answer is Angle = sin-1((1/Hypotenuse)*B)where B is the vertical side of the triangle formed and the hypotenuse is the distance between point 1 and 2.

However the inverse sin function in my program only takes and outputs radians so instead the equation to get degrees becomes

(Angle = sin-1(((1/Hypotenuse)*B *3.14) /180) *180) /3.14

This does not however seem to be right for some reason, as when putting in the parameters of Hypotenuse=150, B=149.6 i get the answer of 85.8 (right) for the original equation and then .9973 degrees for the new equation??

Please help me fix this!

share|cite|improve this question
The inputs of the arcsin function are not in degrees or radians. That's the main problem. – Arturo Magidin Jun 27 '11 at 2:51
up vote 3 down vote accepted

If $B$ is the length of the opposite side, and $H$ is the length of the hypothenuse, then $B/H$ is the sine of the angle. This is not measured in either degrees or radians; it's the value of the sine.

If you take $\arcsin(B/H)$, this will be given in radians. To convert to degrees, you multiply be $180/\pi$. So what you want is: $$\mathrm{angle} = \arcsin\Biggl(\left(\frac{1}{\text{hypothenuse}}\right)*B\Biggr)*180\Bigm/\pi.$$

$3.14$ is a very rough approximation to $\pi$.

share|cite|improve this answer

You would calculate the answer in radians, and then convert to degrees. Inside of the inverse sin should just be (1/hypotenuse*B) since its a ratio of side lengths.

You're overthinking it, I'm guessing.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.