Fix jitter in smooth interpolators.

This commit is contained in:
Mari the Deer 2022-07-21 13:25:02 +02:00
commit 7ee6b71a07
2 changed files with 4 additions and 4 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r191 \cu(Thu 21 Jul 12:50:22 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r191 \cu(2022-07-21 12:50:22)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r192 \cu(Thu 21 Jul 13:25:02 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r192 \cu(2022-07-21 13:25:02)\c-";

View file

@ -228,7 +228,7 @@ Class SmoothLinearValueInterpolator
}
double GetValue( double fractic = 1. )
{
return SWWMUtility.Lerp(oldval,val,fractic);
return (val~==oldval)?val:SWWMUtility.Lerp(oldval,val,fractic);
}
}
Class SmoothDynamicValueInterpolator
@ -261,6 +261,6 @@ Class SmoothDynamicValueInterpolator
}
double GetValue( double fractic = 1. )
{
return SWWMUtility.Lerp(oldval,val,fractic);
return (val~==oldval)?val:SWWMUtility.Lerp(oldval,val,fractic);
}
}