[math-fun] Factoring/normalizing quaternions