|
|
@@ -33,8 +33,8 @@
|
|
|
/// These all operate component-wise. The description is per component.
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
-#ifndef glm_core_func_common
|
|
|
-#define glm_core_func_common
|
|
|
+#ifndef GLM_CORE_func_common
|
|
|
+#define GLM_CORE_func_common GLM_VERSION
|
|
|
|
|
|
#include "_fixes.hpp"
|
|
|
|
|
|
@@ -45,7 +45,6 @@ namespace glm
|
|
|
|
|
|
/// Returns x if x >= 0; otherwise, it returns -x.
|
|
|
///
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genFIType>
|
|
|
@@ -53,7 +52,6 @@ namespace glm
|
|
|
|
|
|
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
|
|
|
///
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genFIType>
|
|
|
@@ -61,7 +59,6 @@ namespace glm
|
|
|
|
|
|
//! Returns a value equal to the nearest integer that is less then or equal to x.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -70,7 +67,6 @@ namespace glm
|
|
|
//! Returns a value equal to the nearest integer to x
|
|
|
//! whose absolute value is not larger than the absolute value of x.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -82,7 +78,6 @@ namespace glm
|
|
|
//! This includes the possibility that round(x) returns the
|
|
|
//! same value as roundEven(x) for all values of x.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -92,7 +87,6 @@ namespace glm
|
|
|
//! A fractional part of 0.5 will round toward the nearest even
|
|
|
//! integer. (Both 3.5 and 4.5 for x will return 4.0.)
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -101,7 +95,6 @@ namespace glm
|
|
|
//! Returns a value equal to the nearest integer
|
|
|
//! that is greater than or equal to x.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -109,7 +102,6 @@ namespace glm
|
|
|
|
|
|
//! Return x - floor(x).
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -118,7 +110,6 @@ namespace glm
|
|
|
//! Modulus. Returns x - y * floor(x / y)
|
|
|
//! for each component in x using the floating point value y.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -129,7 +120,6 @@ namespace glm
|
|
|
//! Modulus. Returns x - y * floor(x / y)
|
|
|
//! for each component in x using the floating point value y.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -142,7 +132,6 @@ namespace glm
|
|
|
//! return value and the output parameter will have the same
|
|
|
//! sign as x.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -152,7 +141,6 @@ namespace glm
|
|
|
|
|
|
/// Returns y if y < x; otherwise, it returns x.
|
|
|
///
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -167,7 +155,6 @@ namespace glm
|
|
|
|
|
|
/// Returns y if x < y; otherwise, it returns x.
|
|
|
///
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -183,7 +170,6 @@ namespace glm
|
|
|
//! Returns min(max(x, minVal), maxVal) for each component in x
|
|
|
//! using the floating-point values minVal and maxVal.
|
|
|
//!
|
|
|
- /// @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -214,22 +200,37 @@ namespace glm
|
|
|
//! provides different functionality than
|
|
|
//! genType mix(genType x, genType y, genType(a))
|
|
|
//! where a is a Boolean vector.
|
|
|
- //!
|
|
|
- //! @see
|
|
|
+ ///
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
- //!
|
|
|
- //! @param[in] x Floating point scalar or vector.
|
|
|
- //! @param[in] y Floating point scalar or vector.
|
|
|
- //! @param[in] a Floating point or boolean scalar or vector.
|
|
|
- //!
|
|
|
- //! @todo Test when 'a' is a boolean.
|
|
|
+ ///
|
|
|
+ /// @param[in] x Value to interpolate.
|
|
|
+ /// @param[in] y Value to interpolate.
|
|
|
+ /// @param[in] a Interpolant.
|
|
|
+ ///
|
|
|
+ /// @tparam genTypeT Floating point scalar or vector.
|
|
|
+ /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
|
|
|
+ ///
|
|
|
+ /// @code
|
|
|
+ /// #include <glm/glm.hpp>
|
|
|
+ /// ...
|
|
|
+ /// float a;
|
|
|
+ /// bool b;
|
|
|
+ /// glm::dvec3 e;
|
|
|
+ /// glm::dvec3 f;
|
|
|
+ /// glm::vec4 g;
|
|
|
+ /// glm::vec4 h;
|
|
|
+ /// ...
|
|
|
+ /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors.
|
|
|
+ /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;
|
|
|
+ /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.
|
|
|
+ /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
|
|
|
+ /// @endcode
|
|
|
template <typename genTypeT, typename genTypeU>
|
|
|
genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
|
|
|
|
|
|
//! Returns 0.0 if x < edge, otherwise it returns 1.0.
|
|
|
- //!
|
|
|
- //! @see
|
|
|
+ //!
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -252,7 +253,6 @@ namespace glm
|
|
|
//! return t * t * (3 – 2 * t);
|
|
|
//! Results are undefined if edge0 >= edge1.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -273,7 +273,6 @@ namespace glm
|
|
|
//! including for implementations with no NaN
|
|
|
//! representations.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -285,7 +284,6 @@ namespace glm
|
|
|
//! otherwise, including for implementations with no infinity
|
|
|
//! representations.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -295,7 +293,6 @@ namespace glm
|
|
|
//! the encoding of a floating-point value. The floatingpoint
|
|
|
//! value's bit-level representation is preserved.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genIType>
|
|
|
@@ -305,7 +302,6 @@ namespace glm
|
|
|
//! the encoding of a floating-point value. The floatingpoint
|
|
|
//! value's bit-level representation is preserved.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genUType>
|
|
|
@@ -317,7 +313,6 @@ namespace glm
|
|
|
//! resulting floating point value is unspecified. Otherwise,
|
|
|
//! the bit-level representation is preserved.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genIType>
|
|
|
@@ -329,7 +324,6 @@ namespace glm
|
|
|
//! resulting floating point value is unspecified. Otherwise,
|
|
|
//! the bit-level representation is preserved.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genUType>
|
|
|
@@ -337,7 +331,6 @@ namespace glm
|
|
|
|
|
|
//! Computes and returns a * b + c.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType>
|
|
|
@@ -353,7 +346,6 @@ namespace glm
|
|
|
//! are both zero. For a floating-point value that is an
|
|
|
//! infinity or is not a number, the results are undefined.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genIType>
|
|
|
@@ -366,7 +358,6 @@ namespace glm
|
|
|
//! If this product is too large to be represented in the
|
|
|
//! floating-point type, the result is undefined.
|
|
|
//!
|
|
|
- //! @see
|
|
|
/// @see - <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
|
|
|
/// @see - <a href="http://www.opengl.org/GLSLangSpec.4.10.6.pdf">GLSL 4.10.6 specification, section 8.3</a>
|
|
|
template <typename genType, typename genIType>
|
|
|
@@ -377,4 +368,4 @@ namespace glm
|
|
|
|
|
|
#include "func_common.inl"
|
|
|
|
|
|
-#endif//glm_core_func_common
|
|
|
+#endif//GLM_CORE_func_common
|