Skip to content

Commit

Permalink
Merge pull request g-truc#1096 from gottfriedleibniz/fix/minmax
Browse files Browse the repository at this point in the history
fix: associated min/max g-truc#1096
  • Loading branch information
christophe-lunarg committed Apr 20, 2022
2 parents 922f391 + 3062122 commit 8b6e2ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions glm/gtx/associated_min_max.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ namespace glm

/// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max
template<typename T, typename U, qualifier Q>
template<typename T, typename U>
GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);

/// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max
template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<2, U, Q> associatedMin(
GLM_FUNC_DECL vec<L, U, Q> associatedMin(
vec<L, T, Q> const& x, vec<L, U, Q> const& a,
vec<L, T, Q> const& y, vec<L, U, Q> const& b);

Expand Down Expand Up @@ -115,7 +115,7 @@ namespace glm
/// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max
template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<2, U, Q> associatedMax(
GLM_FUNC_DECL vec<L, U, Q> associatedMax(
vec<L, T, Q> const& x, vec<L, U, Q> const& a,
vec<L, T, Q> const& y, vec<L, U, Q> const& b);

Expand Down
6 changes: 3 additions & 3 deletions glm/gtx/associated_min_max.inl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace glm{

// Min comparison between 2 variables
template<typename T, typename U, qualifier Q>
template<typename T, typename U>
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
{
return x < y ? a : b;
}

template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, U, Q> associatedMin
GLM_FUNC_QUALIFIER vec<L, U, Q> associatedMin
(
vec<L, T, Q> const& x, vec<L, U, Q> const& a,
vec<L, T, Q> const& y, vec<L, U, Q> const& b
Expand Down Expand Up @@ -169,7 +169,7 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)

// Max comparison between 2 variables
template<length_t L, typename T, typename U, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, U, Q> associatedMax
GLM_FUNC_QUALIFIER vec<L, U, Q> associatedMax
(
vec<L, T, Q> const& x, vec<L, U, Q> const& a,
vec<L, T, Q> const& y, vec<L, U, Q> const& b
Expand Down

0 comments on commit 8b6e2ff

Please sign in to comment.