mirror of
https://github.com/AxioDL/amuse.git
synced 2025-12-08 21:17:49 +00:00
Common: Replace amuse::clamp with std::clamp
We can use the standardized facility for this now with C++17
This commit is contained in:
@@ -57,14 +57,14 @@ void ReverbDelayLine::setdelay(int32_t delay) {
|
||||
}
|
||||
|
||||
EffectReverbStd::EffectReverbStd(float coloration, float mix, float time, float damping, float preDelay)
|
||||
: x140_x1c8_coloration(clamp(0.f, coloration, 1.f))
|
||||
, x144_x1cc_mix(clamp(0.f, mix, 1.f))
|
||||
, x148_x1d0_time(clamp(0.01f, time, 10.f))
|
||||
, x14c_x1d4_damping(clamp(0.f, damping, 1.f))
|
||||
, x150_x1d8_preDelay(clamp(0.f, preDelay, 0.1f)) {}
|
||||
: x140_x1c8_coloration(std::clamp(0.f, coloration, 1.f))
|
||||
, x144_x1cc_mix(std::clamp(0.f, mix, 1.f))
|
||||
, x148_x1d0_time(std::clamp(0.01f, time, 10.f))
|
||||
, x14c_x1d4_damping(std::clamp(0.f, damping, 1.f))
|
||||
, x150_x1d8_preDelay(std::clamp(0.f, preDelay, 0.1f)) {}
|
||||
|
||||
EffectReverbHi::EffectReverbHi(float coloration, float mix, float time, float damping, float preDelay, float crosstalk)
|
||||
: EffectReverbStd(coloration, mix, time, damping, preDelay), x1dc_crosstalk(clamp(0.f, crosstalk, 1.0f)) {}
|
||||
: EffectReverbStd(coloration, mix, time, damping, preDelay), x1dc_crosstalk(std::clamp(0.f, crosstalk, 1.0f)) {}
|
||||
|
||||
template <typename T>
|
||||
EffectReverbStdImp<T>::EffectReverbStdImp(float coloration, float mix, float time, float damping, float preDelay,
|
||||
|
||||
Reference in New Issue
Block a user