mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Merge pull request #2275 from OTHGMars/ClampQuatDot
Adds Clamp to QuatF::dot()
This commit is contained in:
commit
426b0fcbfe
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ inline QuatF& QuatF::neg()
|
||||||
|
|
||||||
inline F32 QuatF::dot( const QuatF &q ) const
|
inline F32 QuatF::dot( const QuatF &q ) const
|
||||||
{
|
{
|
||||||
return (w*q.w + x*q.x + y*q.y + z*q.z);
|
return mClampF(w*q.w + x*q.x + y*q.y + z*q.z, -1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline F32 QuatF::angleBetween( const QuatF & q )
|
inline F32 QuatF::angleBetween( const QuatF & q )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue