Skip to content

Instantly share code, notes, and snippets.

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)