Added missing inverse function for Quaternions

This commit is contained in:
Diren D Bharwani 2022-09-08 23:21:02 +08:00
parent 392b51898a
commit f0b916b275
1 changed files with 11 additions and 0 deletions

View File

@ -258,6 +258,17 @@ namespace SHADE
return result;
}
SHQuaternion SHQuaternion::Inverse(const SHQuaternion& q) noexcept
{
SHQuaternion result;
const XMVECTOR Q = XMLoadFloat4(&q);
XMStoreFloat4(&result, XMQuaternionInverse(Q));
return result;
}
float SHQuaternion::Angle(const SHQuaternion&, const SHQuaternion&) noexcept
{
// TODO (Diren)