Python 求解测角方程

Python solving goniometric equation

我用Python。我有像 sin(a)=v1cos(a)=v2 这样的公式。在数学中,我会做 arcsin(v1)arccos(v2) 来找到这个方程的解。 Python 中的此类方程式有什么好的解法吗?类似于 solve(v1,v2) -> angle?

感谢您的宝贵时间。

atan2(y,x) 应该可以回答您的问题。这是教义:

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