MCPcopy Create free account
hub / github.com/Thinklab-SJTU/Bench2Drive / vector_angle

Function vector_angle

tools/utils.py:109–116  ·  view source on GitHub ↗
(v1, v2)

Source from the content-addressed store, hash-verified

107 return point_ego
108
109def vector_angle(v1, v2):
110 dot_product = np.dot(v1, v2)
111 magnitude_v1 = np.linalg.norm(v1)
112 magnitude_v2 = np.linalg.norm(v2)
113 cos_theta = dot_product / (magnitude_v1 * magnitude_v2)
114 angle_radians = np.arccos(cos_theta)
115 angle_degrees = np.degrees(angle_radians)
116 return angle_degrees
117
118def get_weather_id(weather_conditions):
119 from xml.etree import ElementTree as ET

Callers 1

visualize_dataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected