mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Additional 3d support
This commit is contained in:
parent
70680fdf39
commit
f26df6c86b
32 changed files with 2370 additions and 165 deletions
|
@ -26,11 +26,11 @@ Beefy::Quaternion Beefy::Quaternion::Slerp(float fT, const Quaternion& rkP, cons
|
|||
if ((fabs(fCos) < 1.0f - BF_MS_EPSILON) && (false))
|
||||
{
|
||||
// Standard case (slerp)
|
||||
float fSin = sqrt(1.0f - (fCos * fCos));
|
||||
float fAngle = atan2(fSin, fCos);
|
||||
float fSin = sqrtf(1.0f - (fCos * fCos));
|
||||
float fAngle = atan2f(fSin, fCos);
|
||||
float fInvSin = 1.0f / fSin;
|
||||
float fCoeff0 = sin((1.0f - fT) * fAngle) * fInvSin;
|
||||
float fCoeff1 = sin(fT * fAngle) * fInvSin;
|
||||
float fCoeff0 = sinf((1.0f - fT) * fAngle) * fInvSin;
|
||||
float fCoeff1 = sinf(fT * fAngle) * fInvSin;
|
||||
return fCoeff0 * rkP + fCoeff1 * rkT;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue