Improvements to the math in mEase

Just a few math improvments to mEase to improve compiler optimization.
It appears it’s a mistake

 

From: Daniel Buckmaster [mailto:notifications@github.com] 
Sent: Monday, November 17, 2014 5:09 PM
To: GarageGames/Torque3D
Cc: Vincent Gee
Subject: Re: [Torque3D] Improvements to the math in mEase (#889)

 

In Engine/source/math/mEase.h:

> @@ -278,7 +297,7 @@ inline F32 mEaseOutElastic(F32 t, F32 b, F32 c, F32 d, F32 a, F32 p) {
>       F32 s;
>       if (a < mFabs(c)) { a=c; s=p/4; }
>       else s = p/(2*M_PI_F) * mAsin (c/a);
> -     return a*mPow(2,-10*t) * mSin( (t*d-s)*(2*M_PI_F)/p ) + c + b;
> +     return a*mPow(2,-10*t) * mAsin( (t*d-s)*(2*M_PI_F)/p ) + c + b;

But why the change from mSin to mAsin? It looks like time, t, is being fed into it.

—
Reply to this email directly or view it on GitHub <https://github.com/GarageGames/Torque3D/pull/889/files#r20469287> .  <https://github.com/notifications/beacon/ACUNZH1H5_XyIvac6ymqJXsiiekLXypPks5nOml6gaJpZM4C2tkQ.gif>