calculate angle of line with negative slope

1k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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