Fix jitter in smooth interpolators.
This commit is contained in:
parent
1f7e50de81
commit
7ee6b71a07
2 changed files with 4 additions and 4 deletions
|
|
@ -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-";
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue