Python解决测角方程

时间:2018-03-19 08:33:51

标签: python python-3.x equation sin cos

我使用Python。我有sin(a)=v1cos(a)=v2等公式。在数学中,我会arcsin(v1)arccos(v2)找到这个等式的溶剂。有没有一些很好的方法如何在Python中解决这种方程式?像solve(v1,v2) -> angle

这样的东西

感谢您的时间。

1 个答案:

答案 0 :(得分:2)

atan2(y,x)应该回答你的问题。这是doctring:

>>> help(math.atan2)
Help on built-in function atan2 in module math:

atan2(...)
    atan2(y, x)

    Return the arc tangent (measured in radians) of y/x.
    Unlike atan(y/x), the signs of both x and y are considered.
相关问题