hookeai.data_generation.spdg.patch.rotation_angle_2d¶
- rotation_angle_2d(x1, x2)[source]¶
Compute the rotation angle between two vectors in 2D.
The rotation angle is computed from x1 to x2 array.
- Parameters:
x1 (np.ndarray(1d)) – 1D array.
x2 (np.ndarray(1d)) – 1D array.
- Returns:
angle_deg – Angle (degrees) from x1 to x2, contained between -180 and +180 degrees.
- Return type: