mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use clamp/clamp_range instead of max(min(..., upper), lower)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user