public static Fixed64Quaternion LerpUnclamped(Fixed64Quaternion a, Fixed64Quaternion b, Fixed64 t) { Fixed64Quaternion result = Multiply(a, (1 - t)) + Multiply(b, t); result.Normalize(); return(result); }
public static Fixed64Quaternion FromToRotation(Fixed64Vector3 fromVector, Fixed64Vector3 toVector) { Fixed64Vector3 w = Fixed64Vector3.Cross(fromVector, toVector); Fixed64Quaternion q = new Fixed64Quaternion(w.x, w.y, w.z, Fixed64Vector3.Dot(fromVector, toVector)); q.w += Fixed64.Sqrt(fromVector.SqrMagnitude * toVector.SqrMagnitude); q.Normalize(); return(q); }