18template<
typename Type>
21 static_assert(std::is_floating_point_v<Type>);
23 constexpr Type a(1e-3);
24 constexpr Type b(6.908);
26 if (gain < std::numeric_limits<Type>::epsilon())
29 const Type expGain = a * std::exp(b * gain);
31 if (expGain > Type(1))
Type ExpGain(Type gain) noexcept