Skip to content

Commit 9921bfb

Browse files
committed
wrap min/max calls in brackets
1 parent 33b4a62 commit 9921bfb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

glm/ext/quaternion_exponential.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace glm
6060
//VectorMagnitude to 0. here; we could use denorm_int() compiling a
6161
//project with unsafe maths optimizations might make the comparison
6262
//always false, even when VectorMagnitude is 0.
63-
if (VectorMagnitude < std::numeric_limits<T>::min()) {
63+
if (VectorMagnitude < (std::numeric_limits<T>::min)()) {
6464
//Equivalent to raising a real number to a power
6565
return qua<T, Q>::wxyz(pow(x.w, y), 0, 0, 0);
6666
}

glm/gtx/component_wise.inl

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ namespace detail
1616
{
1717
GLM_FUNC_QUALIFIER static vec<L, floatType, Q> call(vec<L, T, Q> const& v)
1818
{
19-
floatType const Min = static_cast<floatType>(std::numeric_limits<T>::min());
20-
floatType const Max = static_cast<floatType>(std::numeric_limits<T>::max());
19+
floatType const Min = static_cast<floatType>((std::numeric_limits<T>::min)());
20+
floatType const Max = static_cast<floatType>((std::numeric_limits<T>::max)());
2121
return (vec<L, floatType, Q>(v) - Min) / (Max - Min) * static_cast<floatType>(2) - static_cast<floatType>(1);
2222
}
2323
};
@@ -27,7 +27,7 @@ namespace detail
2727
{
2828
GLM_FUNC_QUALIFIER static vec<L, floatType, Q> call(vec<L, T, Q> const& v)
2929
{
30-
return vec<L, floatType, Q>(v) / static_cast<floatType>(std::numeric_limits<T>::max());
30+
return vec<L, floatType, Q>(v) / static_cast<floatType>((std::numeric_limits<T>::max)());
3131
}
3232
};
3333

@@ -49,7 +49,7 @@ namespace detail
4949
{
5050
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, floatType, Q> const& v)
5151
{
52-
floatType const Max = static_cast<floatType>(std::numeric_limits<T>::max()) + static_cast<floatType>(0.5);
52+
floatType const Max = static_cast<floatType>((std::numeric_limits<T>::max)()) + static_cast<floatType>(0.5);
5353
vec<L, floatType, Q> const Scaled(v * Max);
5454
vec<L, T, Q> const Result(Scaled - static_cast<floatType>(0.5));
5555
return Result;
@@ -61,7 +61,7 @@ namespace detail
6161
{
6262
GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, floatType, Q> const& v)
6363
{
64-
return vec<L, T, Q>(vec<L, floatType, Q>(v) * static_cast<floatType>(std::numeric_limits<T>::max()));
64+
return vec<L, T, Q>(vec<L, floatType, Q>(v) * static_cast<floatType>((std::numeric_limits<T>::max)()));
6565
}
6666
};
6767

0 commit comments

Comments
 (0)