MathUtil: Convert Clamp into a constexpr function
This commit is contained in:
1 parent
c5685ba53a
commit
b9e360df7b
13 files changed
+43
-70
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user