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

@ -677,8 +677,8 @@ void CFrame::SetPaneSize()
H = Perspectives[ActivePerspective].Height[j];
// Check limits
MathUtil::Clamp<u32>(&W, 5, 95);
MathUtil::Clamp<u32>(&H, 5, 95);
W = MathUtil::Clamp<u32>(W, 5, 95);
H = MathUtil::Clamp<u32>(H, 5, 95);
// Convert percentages to pixel lengths
W = (W * iClientX) / 100;