Skip to content

Commit

Permalink
Merge branch 'reactivedrop_beta' of https://github.com/ReactiveDrop/r…
Browse files Browse the repository at this point in the history
…eactivedrop_public_src into reactivedrop_beta
  • Loading branch information
jhh8 committed Jul 22, 2023
2 parents 0ffe60b + 0a87f94 commit 05c5b2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/public/tier1/lerp_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inline T LoopingLerp( float flPercent, T flFrom, T flTo )
template <>
inline float LoopingLerp( float flPercent, float flFrom, float flTo )
{
if ( fabs( flTo - flFrom ) >= 0.5f )
if ( fabsf( flTo - flFrom ) >= 0.5f )
{
if (flFrom < flTo)
flFrom += 1.0f;
Expand Down Expand Up @@ -116,15 +116,15 @@ inline T LoopingLerp_Hermite( T current, float t, T p0, T p1, T p2 )
template <>
inline float LoopingLerp_Hermite( float /*current*/, float t, float p0, float p1, float p2 )
{
if ( fabs( p1 - p0 ) > 0.5f )
if ( fabsf( p1 - p0 ) > 0.5f )
{
if ( p0 < p1 )
p0 += 1.0f;
else
p1 += 1.0f;
}

if ( fabs( p2 - p1 ) > 0.5f )
if ( fabsf( p2 - p1 ) > 0.5f )
{
if ( p1 < p2 )
{
Expand All @@ -133,7 +133,7 @@ inline float LoopingLerp_Hermite( float /*current*/, float t, float p0, float p1
// see if we need to fix up p0
// important for vars that are decreasing from p0->p1->p2 where
// p1 is fixed up relative to p2, eg p0 = 0.2, p1 = 0.1, p2 = 0.9
if ( abs( p1 - p0 ) > 0.5 )
if ( fabsf( p1 - p0 ) > 0.5 )
{
if ( p0 < p1 )
p0 += 1.0f;
Expand Down

0 comments on commit 05c5b2e

Please sign in to comment.