Remove overloads in extend,min_max

This commit is contained in:
ZXShady 2025-03-07 20:29:08 +00:00
parent eae39033bd
commit 302ea03860
3 changed files with 18 additions and 205 deletions

View file

@ -13,36 +13,15 @@ namespace glm
return Origin + (Source - Origin) * Distance;
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, T, Q> extend
template<length_t L,typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> extend
(
vec<2, T, Q> const& Origin,
vec<2, T, Q> const& Source,
vec<L, T, Q> const& Origin,
vec<L, T, Q> const& Source,
T const& Distance
)
{
return Origin + (Source - Origin) * Distance;
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> extend
(
vec<3, T, Q> const& Origin,
vec<3, T, Q> const& Source,
T const& Distance
)
{
return Origin + (Source - Origin) * Distance;
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<4, T, Q> extend
(
vec<4, T, Q> const& Origin,
vec<4, T, Q> const& Source,
T const& Distance
)
{
return Origin + (Source - Origin) * Distance;
}
}//namespace glm

View file

@ -35,23 +35,6 @@ namespace glm
T const& y,
T const& z);
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z);
/// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min(
C<T> const& x,
C<T> const& y,
C<T> const& z);
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T>
GLM_FUNC_DECL T min(
@ -60,24 +43,6 @@ namespace glm
T const& z,
T const& w);
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z,
typename C<T>::T const& w);
/// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min(
C<T> const& x,
C<T> const& y,
C<T> const& z,
C<T> const& w);
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template<typename T>
@ -86,22 +51,6 @@ namespace glm
T const& y,
T const& z);
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z);
/// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max(
C<T> const& x,
C<T> const& y,
C<T> const& z);
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T>
@ -111,24 +60,6 @@ namespace glm
T const& z,
T const& w);
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z,
typename C<T>::T const& w);
/// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max
template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max(
C<T> const& x,
C<T> const& y,
C<T> const& z,
C<T> const& w);
/// @}
}//namespace glm

View file

@ -2,137 +2,40 @@
namespace glm
{
template<typename T>
GLM_FUNC_QUALIFIER T min(
T const& x,
T const& y,
T const& z)
{
return glm::min(glm::min(x, y), z);
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z
)
{
return glm::min(glm::min(x, y), z);
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const& x,
C<T> const& y,
C<T> const& z
)
{
return glm::min(glm::min(x, y), z);
T const& z) {
return glm::min(glm::min(x, y),z);
}
template<typename T>
GLM_FUNC_QUALIFIER T min
(
GLM_FUNC_QUALIFIER T min(
T const& x,
T const& y,
T const& z,
T const& w
)
{
return glm::min(glm::min(x, y), glm::min(z, w));
T const& w) {
return glm::min(glm::min(x, y),glm::min(z,w));
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z,
typename C<T>::T const& w
)
{
return glm::min(glm::min(x, y), glm::min(z, w));
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min
(
C<T> const& x,
C<T> const& y,
C<T> const& z,
C<T> const& w
)
{
return glm::min(glm::min(x, y), glm::min(z, w));
template<typename T>
GLM_FUNC_QUALIFIER T max(
T const& x,
T const& y,
T const& z) {
return glm::max(glm::max(x, y),z);
}
template<typename T>
GLM_FUNC_QUALIFIER T max(
T const& x,
T const& y,
T const& z)
{
return glm::max(glm::max(x, y), z);
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z
)
{
return glm::max(glm::max(x, y), z);
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const& x,
C<T> const& y,
C<T> const& z
)
{
return glm::max(glm::max(x, y), z);
}
template<typename T>
GLM_FUNC_QUALIFIER T max
(
T const& x,
T const& y,
T const& z,
T const& w
)
{
return glm::max(glm::max(x, y), glm::max(z, w));
T const& w) {
return glm::max(glm::max(x, y),glm::max(z,w));
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const& x,
typename C<T>::T const& y,
typename C<T>::T const& z,
typename C<T>::T const& w
)
{
return glm::max(glm::max(x, y), glm::max(z, w));
}
template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max
(
C<T> const& x,
C<T> const& y,
C<T> const& z,
C<T> const& w
)
{
return glm::max(glm::max(x, y), glm::max(z, w));
}
}//namespace glm