cos\alpha=\frac{1}{\pm\sqrt{1+tg^2\alpha}}