# solving a problem using degrees OR radians

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??

-

2
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

## 2 Answers

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$.

-

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 7, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9306126236915588, "perplexity_flag": "middle"}