Direct way of computing the clockwise angle between two vectors
2D case Just like the dot product is proportional to the cosine of the angle, the determinant is proportional to its sine. So you can compute the angle like this: dot = x1*x2 + y1*y2 # Dot product between [x1, y1] and [x2, y2] det = x1*y2 – y1*x2 # Determinant angle = atan2(det, dot) … Read more