Skip to content

Commit

Permalink
Fixed Better follow GLSL min and max specification #372
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Aug 20, 2017
1 parent 3358f33 commit fc53581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glm/detail/func_common.inl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace glm
GLM_FUNC_QUALIFIER genType min(genType x, genType y)
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point or integer inputs");
return x < y ? x : y;
return (y < x) ? y : x;
}

// max
Expand All @@ -24,7 +24,7 @@ namespace glm
{
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'max' only accept floating-point or integer inputs");

return x > y ? x : y;
return (x < y) ? y : x;
}

// abs
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
- Fixed Visual C++ 2017.2 warning regarding __has_feature definision #655
- Fixed documentation warnings
- Fixed GLM_HAS_OPENMP when OpenMP is not enabled
- Fixed Better follow GLSL min and max specification #372
#### Deprecation:
- Requires Visual Studio 2013, GCC 4.7, Clang 3.4, Cuda 7, ICC 2013 or a C++11 compiler
Expand Down

0 comments on commit fc53581

Please sign in to comment.