This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import numpy as np | |
def get_rotating_transform(u, v): | |
""" | |
Given two unit vectors u, v, | |
we compute the rotation R such that v = R @ u | |
""" | |
assert np.isclose(np.linalg.norm(u), 1) | |
assert np.isclose(np.linalg.norm(v), 1) |