float MUST_USE_RESULT Quat::AngleBetween(const Quat &target) const { assume(this->IsInvertible()); Quat delta = target / *this; delta.Normalize(); return delta.Angle(); }
float3 MUST_USE_RESULT Quat::SlerpVectorAbs(const float3 &from, const float3 &to, float angleRadians) { if (angleRadians <= 0.f) return from; Quat q = Quat::RotateFromTo(from, to); float a = q.Angle(); if (a <= angleRadians) return to; float t = angleRadians / a; q = Slerp(Quat::identity, q, t); return q.Transform(from); }
float Quat::AngleBetween(const Quat &target) const { assume(this->IsInvertible()); Quat q = target / *this; return q.Angle(); }