|
|
|
|
@@ -3,10 +3,10 @@
|
|
|
|
|
///
|
|
|
|
|
/// @see core (dependence)
|
|
|
|
|
///
|
|
|
|
|
/// @defgroup gtx_extended_min_max GLM_GTX_extented_min_max
|
|
|
|
|
/// @defgroup gtx_extended_min_max GLM_GTX_extended_min_max
|
|
|
|
|
/// @ingroup gtx
|
|
|
|
|
///
|
|
|
|
|
/// Include <glm/gtx/extented_min_max.hpp> to use the features of this extension.
|
|
|
|
|
/// Include <glm/gtx/extended_min_max.hpp> to use the features of this extension.
|
|
|
|
|
///
|
|
|
|
|
/// Min and max functions for 3 to 4 parameters.
|
|
|
|
|
|
|
|
|
|
@@ -16,11 +16,11 @@
|
|
|
|
|
#include "../glm.hpp"
|
|
|
|
|
|
|
|
|
|
#ifndef GLM_ENABLE_EXPERIMENTAL
|
|
|
|
|
# error "GLM: GLM_GTX_extented_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
|
|
|
|
|
# error "GLM: GLM_GTX_extended_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
|
|
|
|
|
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
|
|
|
|
# pragma message("GLM: GLM_GTX_extended_min_max extension included")
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
namespace glm
|
|
|
|
|
@@ -29,7 +29,7 @@ namespace glm
|
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T>
|
|
|
|
|
GLM_FUNC_DECL T min(
|
|
|
|
|
T const& x,
|
|
|
|
|
@@ -37,7 +37,7 @@ namespace glm
|
|
|
|
|
T const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> min(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -45,7 +45,7 @@ namespace glm
|
|
|
|
|
typename C<T>::T const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> min(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -53,7 +53,7 @@ namespace glm
|
|
|
|
|
C<T> const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T>
|
|
|
|
|
GLM_FUNC_DECL T min(
|
|
|
|
|
T const& x,
|
|
|
|
|
@@ -62,7 +62,7 @@ namespace glm
|
|
|
|
|
T const& w);
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> min(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -71,7 +71,7 @@ namespace glm
|
|
|
|
|
typename C<T>::T const& w);
|
|
|
|
|
|
|
|
|
|
/// Return the minimum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> min(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -80,7 +80,7 @@ namespace glm
|
|
|
|
|
C<T> const& w);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T>
|
|
|
|
|
GLM_FUNC_DECL T max(
|
|
|
|
|
T const& x,
|
|
|
|
|
@@ -88,7 +88,7 @@ namespace glm
|
|
|
|
|
T const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> max(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -96,7 +96,7 @@ namespace glm
|
|
|
|
|
typename C<T>::T const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 3 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> max(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -104,7 +104,7 @@ namespace glm
|
|
|
|
|
C<T> const& z);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T>
|
|
|
|
|
GLM_FUNC_DECL T max(
|
|
|
|
|
T const& x,
|
|
|
|
|
@@ -113,7 +113,7 @@ namespace glm
|
|
|
|
|
T const& w);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> max(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -122,7 +122,7 @@ namespace glm
|
|
|
|
|
typename C<T>::T const& w);
|
|
|
|
|
|
|
|
|
|
/// Return the maximum component-wise values of 4 inputs
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename T, template<typename> class C>
|
|
|
|
|
GLM_FUNC_DECL C<T> max(
|
|
|
|
|
C<T> const& x,
|
|
|
|
|
@@ -134,7 +134,7 @@ namespace glm
|
|
|
|
|
///
|
|
|
|
|
/// @tparam genType Floating-point or integer; scalar or vector types.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename genType>
|
|
|
|
|
GLM_FUNC_DECL genType fmin(genType x, genType y);
|
|
|
|
|
|
|
|
|
|
@@ -142,7 +142,7 @@ namespace glm
|
|
|
|
|
///
|
|
|
|
|
/// @tparam genType Floating-point; scalar or vector types.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
/// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
|
|
|
|
|
template<typename genType>
|
|
|
|
|
GLM_FUNC_DECL genType fmax(genType x, genType y);
|
|
|
|
|
@@ -151,7 +151,7 @@ namespace glm
|
|
|
|
|
///
|
|
|
|
|
/// @tparam genType Floating-point scalar or vector types.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<typename genType>
|
|
|
|
|
GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal);
|
|
|
|
|
|
|
|
|
|
@@ -161,7 +161,7 @@ namespace glm
|
|
|
|
|
/// @tparam T Floating-point scalar types
|
|
|
|
|
/// @tparam Q Value from qualifier enum
|
|
|
|
|
///
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<length_t L, typename T, qualifier Q>
|
|
|
|
|
GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal);
|
|
|
|
|
|
|
|
|
|
@@ -171,7 +171,7 @@ namespace glm
|
|
|
|
|
/// @tparam T Floating-point scalar types
|
|
|
|
|
/// @tparam Q Value from qualifier enum
|
|
|
|
|
///
|
|
|
|
|
/// @see gtx_extented_min_max
|
|
|
|
|
/// @see gtx_extended_min_max
|
|
|
|
|
template<length_t L, typename T, qualifier Q>
|
|
|
|
|
GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
|
|
|
|
|
|
|
|
|
|
|