updated Quaternion.to_matrix to always use a normalized version of quat for calculations