SW/Tev: Use std::clamp for Clamp255 and Clamp1024

This commit is contained in:
Pokechu22 2021-12-21 18:23:39 -08:00
parent bae0f21f74
commit 3b9a048291
1 changed files with 2 additions and 2 deletions

View File

@ -29,12 +29,12 @@
static inline s16 Clamp255(s16 in)
{
return in > 255 ? 255 : (in < 0 ? 0 : in);
return std::clamp<s16>(in, 0, 255);
}
static inline s16 Clamp1024(s16 in)
{
return in > 1023 ? 1023 : (in < -1024 ? -1024 : in);
return std::clamp<s16>(in, -1024, 1023);
}
void Tev::SetRasColor(RasColorChan colorChan, int swaptable)