STYLE: use clamp/clamp_range instead of max(min(..., upper), lower)

This commit is contained in:
Mark Olesen
2023-02-01 18:39:19 +01:00
parent 4d45cfd5a9
commit ba6667a344
38 changed files with 89 additions and 151 deletions

View File

@ -100,7 +100,7 @@ protected:
//- that forms the basis of many more complex ramp functions
inline scalar linearRamp(const scalar t) const
{
return max(min((t - start_)/duration_, 1), 0);
return clamp((t - start_)/duration_, 0, 1);
}