1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Merge pull request #3 from Minoost/master

Add gitignore and fix UtilMath::clamp
This commit is contained in:
SapphireMordred 2017-08-08 14:05:42 +02:00 committed by GitHub
commit 9267fc7ebf
2 changed files with 13 additions and 3 deletions

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
bin
.vs
*.dat
*.suo
*.pch

View file

@ -29,9 +29,17 @@ template
<typename T>
T clamp( T val, T minimum, T maximum )
{
// TODO: Lazy hack, do this properly...
return maximum;
// return std::max( std::min( val, maximum ), minimum );
if (val > maximum)
{
return maximum;
}
if (val < minimum)
{
return minimum;
}
return val;
}
}
}