热门标签
更多>
搜索结果
查询Tags标签: angle2,共有 2条记录-
python点到向量的距离,夹角
import numpy as npdef angle(v1, v2):dx1 = v1[2] - v1[0]dy1 = -(v1[3] - v1[1])dx2 = v2[2] - v2[0]dy2 = -(v2[3] - v2[1])angle1 = math.atan2(dy1, dx1)angle1 = -int(angle1 * 180 / math.pi)if angle1 < 0:angle1 = 360 + angle1# print(angle1)angle2 = math.…
2021/10/4 12:40:44 人评论 次浏览 -
python点到向量的距离,夹角
import numpy as npdef angle(v1, v2):dx1 = v1[2] - v1[0]dy1 = -(v1[3] - v1[1])dx2 = v2[2] - v2[0]dy2 = -(v2[3] - v2[1])angle1 = math.atan2(dy1, dx1)angle1 = -int(angle1 * 180 / math.pi)if angle1 < 0:angle1 = 360 + angle1# print(angle1)angle2 = math.…
2021/10/4 12:40:44 人评论 次浏览