下有为,未来可期!

Python入门之三角函数atan2()函数详解

在数学中,atan2()是一个根据直角坐标的坐标值返回其所在象限的角度,范围是[-π,π]。在Python中,atan2()是math模块中的一个三角函数,它的使用方法和功能也与数学的atan2()函数相似。


import math
x1, y1 = 0, 0  # 以A为原点
x2, y2 = 4, 4  # B点坐标
angle = math.atan2(y2 - y1, x2 - x1)
print(angle)
angle=angle*57.2
print(angle)


搜索
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
友情链接

Powered By Z-BlogPHP 1.7.2

Copyright kay880.top.Some Rights Reserved.