mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
Add gitignore and fix UtilMath::clamp
This commit is contained in:
parent
e691d0504a
commit
015fa17628
2 changed files with 13 additions and 1 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
bin
|
||||
.vs
|
|
@ -29,7 +29,17 @@ template
|
|||
<typename T>
|
||||
T clamp( T val, T minimum, T maximum )
|
||||
{
|
||||
return std::max( std::min( val, maximum ), minimum );
|
||||
if (val > maximum)
|
||||
{
|
||||
return maximum;
|
||||
}
|
||||
|
||||
if (val < minimum)
|
||||
{
|
||||
return minimum;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue