MathUtil: Convert Clamp into a constexpr function

This commit is contained in:
Lioncash
2015-09-11 23:43:17 -04:00
parent c5685ba53a
commit b9e360df7b
13 changed files with 43 additions and 70 deletions

View File

@ -53,8 +53,8 @@ template<typename SType> SType ScaleAndClamp(double ps, u32 stScale)
float convPS = (float)ps * m_quantizeTable[stScale];
float min = (float)std::numeric_limits<SType>::min();
float max = (float)std::numeric_limits<SType>::max();
MathUtil::Clamp(&convPS, min, max);
return (SType)convPS;
return (SType)MathUtil::Clamp(convPS, min, max);
}
template<typename T> static T ReadUnpaired(u32 addr);