0
$\begingroup$

I want to use the formula $$ tan(\alpha)=m $$ for negative slopes but always get negative degrees. For instance, say the slope of a line $g$ is $-1$. Using the formula above (arctan$(-1)=\alpha$), I get $-45$ degrees instead of $135$ degrees. Why exactly does this formula not returning correct angles for negative slopes?

$\endgroup$
  • $\begingroup$ It all depends on how you define $\arctan$. It is usually defined as the inverse function of the restriction of $\tan$ on $\left( -\frac{\pi}{2}, \frac{\pi}{2}\right)$. $\endgroup$ – Bill O'Haran Dec 18 '18 at 10:12
0
$\begingroup$

Use this formula: $\alpha=\begin{cases}\tan^{-1}m,&m\ge0\\\pi+\tan^{-1}m,&m<0\end{cases}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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