Common: Replace amuse::clamp with std::clamp

We can use the standardized facility for this now with C++17
This commit is contained in:
Lioncash
2019-08-26 05:02:26 -04:00
parent 88c017926b
commit eaf62288a2
20 changed files with 106 additions and 110 deletions

View File

@@ -37,7 +37,7 @@ static const float DLSVolumeTable[] = {
0.892802f, 0.907744f, 0.922810f, 0.938000f, 0.953314f, 0.968752f, 0.984314f, 1.000000f, 1.000000f};
float LookupVolume(float vol) {
vol = amuse::clamp(0.f, vol * 127.f, 127.f);
vol = std::clamp(0.f, vol * 127.f, 127.f);
float f = std::floor(vol);
float c = std::ceil(vol);
if (f == c)
@@ -47,7 +47,7 @@ float LookupVolume(float vol) {
}
float LookupDLSVolume(float vol) {
vol = amuse::clamp(0.f, vol * 127.f, 127.f);
vol = std::clamp(0.f, vol * 127.f, 127.f);
float f = std::floor(vol);
float c = std::ceil(vol);
if (f == c)