mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2026-01-02 09:42:28 +00:00
Make HMM_Clamp branchless in optimized builds (#122)
This commit is contained in:
@@ -595,7 +595,8 @@ HMM_INLINE float HMM_PREFIX(Clamp)(float Min, float Value, float Max)
|
||||
{
|
||||
Result = Min;
|
||||
}
|
||||
else if(Result > Max)
|
||||
|
||||
if(Result > Max)
|
||||
{
|
||||
Result = Max;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user