mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 02:04:35 +00:00
fix: associated min/max
Remove unused qualifier and fix incorrect definition
This commit is contained in:
parent
6ad79aae3e
commit
3062122e5e
@ -31,13 +31,13 @@ namespace glm
|
|||||||
|
|
||||||
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
||||||
/// @see gtx_associated_min_max
|
/// @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);
|
GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);
|
||||||
|
|
||||||
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
/// Minimum comparison between 2 variables and returns 2 associated variable values
|
||||||
/// @see gtx_associated_min_max
|
/// @see gtx_associated_min_max
|
||||||
template<length_t L, typename T, typename U, qualifier Q>
|
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& x, vec<L, U, Q> const& a,
|
||||||
vec<L, T, Q> const& y, vec<L, U, Q> const& b);
|
vec<L, T, Q> const& y, vec<L, U, Q> const& b);
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ namespace glm
|
|||||||
/// Maximum comparison between 2 variables and returns 2 associated variable values
|
/// Maximum comparison between 2 variables and returns 2 associated variable values
|
||||||
/// @see gtx_associated_min_max
|
/// @see gtx_associated_min_max
|
||||||
template<length_t L, typename T, typename U, qualifier Q>
|
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& x, vec<L, U, Q> const& a,
|
||||||
vec<L, T, Q> const& y, vec<L, U, Q> const& b);
|
vec<L, T, Q> const& y, vec<L, U, Q> const& b);
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
|
|
||||||
// Min comparison between 2 variables
|
// 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)
|
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
|
||||||
{
|
{
|
||||||
return x < y ? a : b;
|
return x < y ? a : b;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<length_t L, typename T, typename U, qualifier Q>
|
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& x, vec<L, U, Q> const& a,
|
||||||
vec<L, T, Q> const& y, vec<L, U, Q> const& b
|
vec<L, T, Q> const& y, vec<L, U, Q> const& b
|
||||||
@ -169,7 +169,7 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)
|
|||||||
|
|
||||||
// Max comparison between 2 variables
|
// Max comparison between 2 variables
|
||||||
template<length_t L, typename T, typename U, qualifier Q>
|
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& x, vec<L, U, Q> const& a,
|
||||||
vec<L, T, Q> const& y, vec<L, U, Q> const& b
|
vec<L, T, Q> const& y, vec<L, U, Q> const& b
|
||||||
|
Loading…
Reference in New Issue
Block a user