diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index a57db01a..88d5dab4 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -212,7 +212,7 @@ namespace detail GLM_FUNC_QUALIFIER vecType uaddCarry(vecType const & x, vecType const & y, vecType & Carry) { vecType Value64(vecType(x) + vecType(y)); - vecType Max32(static_cast(std::numeric_limits::max())); + vecType Max32(static_cast(1) << static_cast(32) - static_cast(1)); Carry = mix(vecType(0), vecType(1), greaterThan(Value64, Max32)); return vecType(Value64 % (Max32 + static_cast(1))); }