cleanup : Remove trailing whitespaces.

This commit is contained in:
Philippe Groarke 2018-03-24 20:01:03 -04:00
parent a5072f5ce5
commit fd327cd341
142 changed files with 1603 additions and 1603 deletions

View File

@ -1,11 +1,11 @@
/// @ref core /// @ref core
/// @file glm/common.hpp /// @file glm/common.hpp
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// ///
/// @defgroup core_func_common Common functions /// @defgroup core_func_common Common functions
/// @ingroup core /// @ingroup core
/// ///
/// Include <glm/common.hpp> to use these core features. /// Include <glm/common.hpp> to use these core features.
/// ///
/// These all operate component-wise. The description is per component. /// These all operate component-wise. The description is per component.
@ -23,9 +23,9 @@ namespace glm
/// @{ /// @{
/// Returns x if x >= 0; otherwise, it returns -x. /// Returns x if x >= 0; otherwise, it returns -x.
/// ///
/// @tparam genType floating-point or signed integer; scalar or vector types. /// @tparam genType floating-point or signed integer; scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// @see qualifier /// @see qualifier
@ -37,13 +37,13 @@ namespace glm
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point or signed integer scalar types /// @tparam T Floating-point or signed integer scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/abs.xml">GLSL abs man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> abs(vec<L, T, Q> const& x); GLM_FUNC_DECL vec<L, T, Q> abs(vec<L, T, Q> const& x);
/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
@ -54,7 +54,7 @@ namespace glm
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> sign(vec<L, T, Q> const& x); GLM_FUNC_DECL vec<L, T, Q> sign(vec<L, T, Q> const& x);
/// Returns a value equal to the nearest integer that is less then or equal to x. /// Returns a value equal to the nearest integer that is less then or equal to x.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
@ -119,7 +119,7 @@ namespace glm
GLM_FUNC_DECL vec<L, T, Q> ceil(vec<L, T, Q> const& x); GLM_FUNC_DECL vec<L, T, Q> ceil(vec<L, T, Q> const& x);
/// Return x - floor(x). /// Return x - floor(x).
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/fract.xml">GLSL fract man page</a>
@ -160,7 +160,7 @@ namespace glm
/// part (as a whole number floating point value). Both the /// part (as a whole number floating point value). Both the
/// return value and the output parameter will have the same /// return value and the output parameter will have the same
/// sign as x. /// sign as x.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/modf.xml">GLSL modf man page</a>
@ -171,7 +171,7 @@ namespace glm
/// Returns y if y < x; otherwise, it returns x. /// Returns y if y < x; otherwise, it returns x.
/// ///
/// @tparam genType Floating-point or integer; scalar or vector types. /// @tparam genType Floating-point or integer; scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/min.xml">GLSL min man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
@ -200,37 +200,37 @@ namespace glm
GLM_FUNC_DECL vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y); GLM_FUNC_DECL vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
/// Returns y if x < y; otherwise, it returns x. /// Returns y if x < y; otherwise, it returns x.
/// ///
/// @tparam genType Floating-point or integer; scalar or vector types. /// @tparam genType Floating-point or integer; scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType max(genType x, genType y); GLM_FUNC_DECL genType max(genType x, genType y);
/// Returns y if x < y; otherwise, it returns x. /// Returns y if x < y; otherwise, it returns x.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point or integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, T y); GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, T y);
/// Returns y if x < y; otherwise, it returns x. /// Returns y if x < y; otherwise, it returns x.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point or integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/max.xml">GLSL max man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y); GLM_FUNC_DECL vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
/// Returns min(max(x, minVal), maxVal) for each component in x /// Returns min(max(x, minVal), maxVal) for each component in x
/// using the floating-point values minVal and maxVal. /// using the floating-point values minVal and maxVal.
/// ///
/// @tparam genType Floating-point or integer; scalar or vector types. /// @tparam genType Floating-point or integer; scalar or vector types.
@ -240,7 +240,7 @@ namespace glm
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType clamp(genType x, genType minVal, genType maxVal); GLM_FUNC_DECL genType clamp(genType x, genType minVal, genType maxVal);
/// Returns min(max(x, minVal), maxVal) for each component in x /// Returns min(max(x, minVal), maxVal) for each component in x
/// using the floating-point values minVal and maxVal. /// using the floating-point values minVal and maxVal.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
@ -252,7 +252,7 @@ namespace glm
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& x, T minVal, T maxVal); GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& x, T minVal, T maxVal);
/// Returns min(max(x, minVal), maxVal) for each component in x /// Returns min(max(x, minVal), maxVal) for each component in x
/// using the floating-point values minVal and maxVal. /// using the floating-point values minVal and maxVal.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
@ -268,7 +268,7 @@ namespace glm
/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of /// Returns x * (1.0 - a) + y * a, i.e., the linear blend of
/// x and y using the floating-point value a. /// x and y using the floating-point value a.
/// The value for a is not restricted to the range [0, 1]. /// The value for a is not restricted to the range [0, 1].
/// ///
/// If genTypeU is a boolean scalar or vector: /// If genTypeU is a boolean scalar or vector:
/// Selects which vector each returned component comes /// Selects which vector each returned component comes
/// from. For a component of 'a' that is false, the /// from. For a component of 'a' that is false, the
@ -280,17 +280,17 @@ namespace glm
/// provides different functionality than /// provides different functionality than
/// genType mix(genType x, genType y, genType(a)) /// genType mix(genType x, genType y, genType(a))
/// where a is a Boolean vector. /// where a is a Boolean vector.
/// ///
/// @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/sdk/docs/manglsl/xhtml/mix.xml">GLSL mix man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
/// ///
/// @param[in] x Value to interpolate. /// @param[in] x Value to interpolate.
/// @param[in] y Value to interpolate. /// @param[in] y Value to interpolate.
/// @param[in] a Interpolant. /// @param[in] a Interpolant.
/// ///
/// @tparam genTypeT Floating point scalar or vector. /// @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. /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.
/// ///
/// @code /// @code
/// #include <glm/glm.hpp> /// #include <glm/glm.hpp>
/// ... /// ...
@ -301,7 +301,7 @@ namespace glm
/// glm::vec4 g; /// glm::vec4 g;
/// glm::vec4 h; /// glm::vec4 h;
/// ... /// ...
/// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors.
/// glm::vec4 s = glm::mix(g, h, b); // Returns g or h; /// glm::vec4 s = glm::mix(g, h, b); // Returns 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::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. /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.
@ -316,29 +316,29 @@ namespace glm
GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a); GLM_FUNC_DECL vec<L, T, Q> mix(vec<L, T, Q> const& x, vec<L, T, Q> const& y, U a);
/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType. /// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.
/// ///
/// @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/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType step(genType edge, genType x); GLM_FUNC_DECL genType step(genType edge, genType x);
/// Returns 0.0 if x < edge, otherwise it returns 1.0. /// Returns 0.0 if x < edge, otherwise it returns 1.0.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> step(T edge, vec<L, T, Q> const& x); GLM_FUNC_DECL vec<L, T, Q> step(T edge, vec<L, T, Q> const& x);
/// Returns 0.0 if x < edge, otherwise it returns 1.0. /// Returns 0.0 if x < edge, otherwise it returns 1.0.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/step.xml">GLSL step man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -355,7 +355,7 @@ namespace glm
/// Results are undefined if edge0 >= edge1. /// Results are undefined if edge0 >= edge1.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/smoothstep.xml">GLSL smoothstep man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
@ -372,9 +372,9 @@ namespace glm
/// floating point representations. Returns false otherwise, /// floating point representations. Returns false otherwise,
/// including for implementations with no NaN /// including for implementations with no NaN
/// representations. /// representations.
/// ///
/// /!\ When using compiler fast math, this function may fail. /// /!\ When using compiler fast math, this function may fail.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
@ -389,11 +389,11 @@ namespace glm
/// set of floating point representations. Returns false /// set of floating point representations. Returns false
/// otherwise, including for implementations with no infinity /// otherwise, including for implementations with no infinity
/// representations. /// representations.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/isinf.xml">GLSL isinf man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -402,7 +402,7 @@ namespace glm
/// Returns a signed integer value representing /// Returns a signed integer value representing
/// the encoding of a floating-point value. The floating-point /// the encoding of a floating-point value. The floating-point
/// value's bit-level representation is preserved. /// value's bit-level representation is preserved.
/// ///
/// @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/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL int floatBitsToInt(float const& v); GLM_FUNC_DECL int floatBitsToInt(float const& v);
@ -410,10 +410,10 @@ namespace glm
/// Returns a signed integer value representing /// Returns a signed integer value representing
/// the encoding of a floating-point value. The floatingpoint /// the encoding of a floating-point value. The floatingpoint
/// value's bit-level representation is preserved. /// value's bit-level representation is preserved.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/floatBitsToInt.xml">GLSL floatBitsToInt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, qualifier Q> template<length_t L, qualifier Q>
@ -422,7 +422,7 @@ namespace glm
/// Returns a unsigned integer value representing /// Returns a unsigned integer value representing
/// the encoding of a floating-point value. The floatingpoint /// the encoding of a floating-point value. The floatingpoint
/// value's bit-level representation is preserved. /// value's bit-level representation is preserved.
/// ///
/// @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/sdk/docs/manglsl/xhtml/floatBitsToUint.xml">GLSL floatBitsToUint man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL uint floatBitsToUint(float const& v); GLM_FUNC_DECL uint floatBitsToUint(float const& v);
@ -444,7 +444,7 @@ namespace glm
/// If an inf or NaN is passed in, it will not signal, and the /// If an inf or NaN is passed in, it will not signal, and the
/// resulting floating point value is unspecified. Otherwise, /// resulting floating point value is unspecified. Otherwise,
/// the bit-level representation is preserved. /// the bit-level representation is preserved.
/// ///
/// @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/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float intBitsToFloat(int const& v); GLM_FUNC_DECL float intBitsToFloat(int const& v);
@ -454,10 +454,10 @@ namespace glm
/// If an inf or NaN is passed in, it will not signal, and the /// If an inf or NaN is passed in, it will not signal, and the
/// resulting floating point value is unspecified. Otherwise, /// resulting floating point value is unspecified. Otherwise,
/// the bit-level representation is preserved. /// the bit-level representation is preserved.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/intBitsToFloat.xml">GLSL intBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, qualifier Q> template<length_t L, qualifier Q>
@ -468,7 +468,7 @@ namespace glm
/// If an inf or NaN is passed in, it will not signal, and the /// If an inf or NaN is passed in, it will not signal, and the
/// resulting floating point value is unspecified. Otherwise, /// resulting floating point value is unspecified. Otherwise,
/// the bit-level representation is preserved. /// the bit-level representation is preserved.
/// ///
/// @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/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
GLM_FUNC_DECL float uintBitsToFloat(uint const& v); GLM_FUNC_DECL float uintBitsToFloat(uint const& v);
@ -478,19 +478,19 @@ namespace glm
/// If an inf or NaN is passed in, it will not signal, and the /// If an inf or NaN is passed in, it will not signal, and the
/// resulting floating point value is unspecified. Otherwise, /// resulting floating point value is unspecified. Otherwise,
/// the bit-level representation is preserved. /// the bit-level representation is preserved.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @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/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml">GLSL uintBitsToFloat man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<length_t L, qualifier Q> template<length_t L, qualifier Q>
GLM_FUNC_DECL vec<L, float, Q> uintBitsToFloat(vec<L, uint, Q> const& v); GLM_FUNC_DECL vec<L, float, Q> uintBitsToFloat(vec<L, uint, Q> const& v);
/// Computes and returns a * b + c. /// Computes and returns a * b + c.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/fma.xml">GLSL fma man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
@ -499,15 +499,15 @@ namespace glm
/// Splits x into a floating-point significand in the range /// Splits x into a floating-point significand in the range
/// [0.5, 1.0) and an integral exponent of two, such that: /// [0.5, 1.0) and an integral exponent of two, such that:
/// x = significand * exp(2, exponent) /// x = significand * exp(2, exponent)
/// ///
/// The significand is returned by the function and the /// The significand is returned by the function and the
/// exponent is returned in the parameter exp. For a /// exponent is returned in the parameter exp. For a
/// floating-point value of zero, the significant and exponent /// floating-point value of zero, the significant and exponent
/// are both zero. For a floating-point value that is an /// are both zero. For a floating-point value that is an
/// infinity or is not a number, the results are undefined. /// infinity or is not a number, the results are undefined.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/frexp.xml">GLSL frexp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType, typename genIType> template<typename genType, typename genIType>
@ -516,13 +516,13 @@ namespace glm
/// Builds a floating-point number from x and the /// Builds a floating-point number from x and the
/// corresponding integral exponent of two in exp, returning: /// corresponding integral exponent of two in exp, returning:
/// significand * exp(2, exponent) /// significand * exp(2, exponent)
/// ///
/// If this product is too large to be represented in the /// If this product is too large to be represented in the
/// floating-point type, the result is undefined. /// floating-point type, the result is undefined.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/ldexp.xml">GLSL ldexp man page</a>;
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType, typename genIType> template<typename genType, typename genIType>
GLM_FUNC_DECL genType ldexp(genType const& x, genIType const& exp); GLM_FUNC_DECL genType ldexp(genType const& x, genIType const& exp);

View File

@ -26,7 +26,7 @@
// Variadic templates - GCC 4.3 // Variadic templates - GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf
// //
// Extending variadic template template parameters - GCC 4.4 // Extending variadic template template parameters - GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf
@ -34,7 +34,7 @@
// Initializer lists - GCC 4.4 // Initializer lists - GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
// #define GLM_CXX11_STATIC_ASSERT // #define GLM_CXX11_STATIC_ASSERT
// Static assertions - GCC 4.3 // Static assertions - GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html
@ -62,15 +62,15 @@
// Declared type of an expression - GCC 4.3 // Declared type of an expression - GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf
// //
// Right angle brackets - GCC 4.3 // Right angle brackets - GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html
// //
// Default template arguments for function templates DR226 GCC 4.3 // Default template arguments for function templates DR226 GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226 // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226
// //
// Solving the SFINAE problem for expressions DR339 GCC 4.4 // Solving the SFINAE problem for expressions DR339 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html
@ -78,7 +78,7 @@
// Template aliases N2258 GCC 4.7 // Template aliases N2258 GCC 4.7
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
// //
// Extern templates N1987 Yes // Extern templates N1987 Yes
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm
@ -90,19 +90,19 @@
// Strongly-typed enums N2347 GCC 4.4 // Strongly-typed enums N2347 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf
// //
// Forward declarations for enums N2764 GCC 4.6 // Forward declarations for enums N2764 GCC 4.6
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf
// //
// Generalized attributes N2761 GCC 4.8 // Generalized attributes N2761 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
// //
// Generalized constant expressions N2235 GCC 4.6 // Generalized constant expressions N2235 GCC 4.6
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
// //
// Alignment support N2341 GCC 4.8 // Alignment support N2341 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
@ -110,7 +110,7 @@
// Delegating constructors N1986 GCC 4.7 // Delegating constructors N1986 GCC 4.7
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf
// //
// Inheriting constructors N2540 GCC 4.8 // Inheriting constructors N2540 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm
@ -118,19 +118,19 @@
// Explicit conversion operators N2437 GCC 4.5 // Explicit conversion operators N2437 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
// //
// New character types N2249 GCC 4.4 // New character types N2249 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html
// //
// Unicode string literals N2442 GCC 4.5 // Unicode string literals N2442 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
// //
// Raw string literals N2442 GCC 4.5 // Raw string literals N2442 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm
// //
// Universal character name literals N2170 GCC 4.5 // Universal character name literals N2170 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
@ -138,7 +138,7 @@
// User-defined literals N2765 GCC 4.7 // User-defined literals N2765 GCC 4.7
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf
// //
// Standard Layout Types N2342 GCC 4.5 // Standard Layout Types N2342 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm
@ -147,11 +147,11 @@
// Defaulted and deleted functions N2346 GCC 4.4 // Defaulted and deleted functions N2346 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm
// //
// Extended friend declarations N1791 GCC 4.7 // Extended friend declarations N1791 GCC 4.7
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf
// //
// Extending sizeof N2253 GCC 4.4 // Extending sizeof N2253 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html
@ -177,7 +177,7 @@
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm
// //
// Minimal support for garbage collection and reachability-based leak detection N2670 No // Minimal support for garbage collection and reachability-based leak detection N2670 No
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm
@ -185,67 +185,67 @@
// Allowing move constructors to throw [noexcept] N3050 GCC 4.6 (core language only) // Allowing move constructors to throw [noexcept] N3050 GCC 4.6 (core language only)
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
// //
// Defining move special member functions N3053 GCC 4.6 // Defining move special member functions N3053 GCC 4.6
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html
// //
// Sequence points N2239 Yes // Sequence points N2239 Yes
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
// //
// Atomic operations N2427 GCC 4.4 // Atomic operations N2427 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html
// //
// Strong Compare and Exchange N2748 GCC 4.5 // Strong Compare and Exchange N2748 GCC 4.5
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html
// //
// Bidirectional Fences N2752 GCC 4.8 // Bidirectional Fences N2752 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm
// //
// Memory model N2429 GCC 4.8 // Memory model N2429 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm
// //
// Data-dependency ordering: atomics and memory model N2664 GCC 4.4 // Data-dependency ordering: atomics and memory model N2664 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm
// //
// Propagating exceptions N2179 GCC 4.4 // Propagating exceptions N2179 GCC 4.4
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html
// //
// Abandoning a process and at_quick_exit N2440 GCC 4.8 // Abandoning a process and at_quick_exit N2440 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm
// //
// Allow atomics use in signal handlers N2547 Yes // Allow atomics use in signal handlers N2547 Yes
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm
// //
// Thread-local storage N2659 GCC 4.8 // Thread-local storage N2659 GCC 4.8
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm
// //
// Dynamic initialization and destruction with concurrency N2660 GCC 4.3 // Dynamic initialization and destruction with concurrency N2660 GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm
// //
// __func__ predefined identifier N2340 GCC 4.3 // __func__ predefined identifier N2340 GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm
// //
// C99 preprocessor N1653 GCC 4.3 // C99 preprocessor N1653 GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
// //
// long long N1811 GCC 4.3 // long long N1811 GCC 4.3
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf
// //
// Extended integral types N1988 Yes // Extended integral types N1988 Yes
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf

View File

@ -28,13 +28,13 @@ namespace detail
{ {
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x); return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> permute(vec<3, T, Q> const& x) GLM_FUNC_QUALIFIER vec<3, T, Q> permute(vec<3, T, Q> const& x)
{ {
return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x); return mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<4, T, Q> permute(vec<4, T, Q> const& x) GLM_FUNC_QUALIFIER vec<4, T, Q> permute(vec<4, T, Q> const& x)
{ {
@ -46,19 +46,19 @@ namespace detail
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, T, Q> taylorInvSqrt(vec<2, T, Q> const& r) GLM_FUNC_QUALIFIER vec<2, T, Q> taylorInvSqrt(vec<2, T, Q> const& r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> taylorInvSqrt(vec<3, T, Q> const& r) GLM_FUNC_QUALIFIER vec<3, T, Q> taylorInvSqrt(vec<3, T, Q> const& r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<4, T, Q> taylorInvSqrt(vec<4, T, Q> const& r) GLM_FUNC_QUALIFIER vec<4, T, Q> taylorInvSqrt(vec<4, T, Q> const& r)
{ {
@ -70,13 +70,13 @@ namespace detail
{ {
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> fade(vec<3, T, Q> const& t) GLM_FUNC_QUALIFIER vec<3, T, Q> fade(vec<3, T, Q> const& t)
{ {
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<4, T, Q> fade(vec<4, T, Q> const& t) GLM_FUNC_QUALIFIER vec<4, T, Q> fade(vec<4, T, Q> const& t)
{ {

View File

@ -16,7 +16,7 @@ namespace detail
// Use an opaque buffer to *ensure* the compiler doesn't call a constructor. // Use an opaque buffer to *ensure* the compiler doesn't call a constructor.
// The size 1 buffer is assumed to aligned to the actual members so that the // The size 1 buffer is assumed to aligned to the actual members so that the
// elem() // elem()
char _buffer[1]; char _buffer[1];
}; };
@ -39,7 +39,7 @@ namespace detail
template<typename T, qualifier Q, int E0, int E1, int E2, int E3, bool Aligned> template<typename T, qualifier Q, int E0, int E1, int E2, int E3, bool Aligned>
struct _swizzle_base1<4, T, Q, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4> struct _swizzle_base1<4, T, Q, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, T, Q> operator ()() const { return vec<4, T, Q>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } GLM_FUNC_QUALIFIER vec<4, T, Q> operator ()() const { return vec<4, T, Q>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
}; };
@ -52,7 +52,7 @@ namespace detail
E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec
DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles
containing duplicate elements so that they cannot be used as r-values). containing duplicate elements so that they cannot be used as r-values).
*/ */
template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS> template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
struct _swizzle_base2 : public _swizzle_base1<N, T, Q, E0,E1,E2,E3, detail::is_aligned<Q>::value> struct _swizzle_base2 : public _swizzle_base1<N, T, Q, E0,E1,E2,E3, detail::is_aligned<Q>::value>
@ -66,8 +66,8 @@ namespace detail
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (vec<N, T, Q> const& that) GLM_FUNC_QUALIFIER _swizzle_base2& operator= (vec<N, T, Q> const& that)
{ {
struct op { struct op {
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e = t; } GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e = t; }
}; };
_apply_op(that, op()); _apply_op(that, op());
return *this; return *this;
@ -75,32 +75,32 @@ namespace detail
GLM_FUNC_QUALIFIER void operator -= (vec<N, T, Q> const& that) GLM_FUNC_QUALIFIER void operator -= (vec<N, T, Q> const& that)
{ {
struct op { struct op {
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e -= t; } GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e -= t; }
}; };
_apply_op(that, op()); _apply_op(that, op());
} }
GLM_FUNC_QUALIFIER void operator += (vec<N, T, Q> const& that) GLM_FUNC_QUALIFIER void operator += (vec<N, T, Q> const& that)
{ {
struct op { struct op {
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e += t; } GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e += t; }
}; };
_apply_op(that, op()); _apply_op(that, op());
} }
GLM_FUNC_QUALIFIER void operator *= (vec<N, T, Q> const& that) GLM_FUNC_QUALIFIER void operator *= (vec<N, T, Q> const& that)
{ {
struct op { struct op {
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e *= t; } GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e *= t; }
}; };
_apply_op(that, op()); _apply_op(that, op());
} }
GLM_FUNC_QUALIFIER void operator /= (vec<N, T, Q> const& that) GLM_FUNC_QUALIFIER void operator /= (vec<N, T, Q> const& that)
{ {
struct op { struct op {
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e /= t; } GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e /= t; }
}; };
_apply_op(that, op()); _apply_op(that, op());
} }
@ -232,7 +232,7 @@ namespace detail
GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const GLM_SWIZZLE_TYPE1& b) \ GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const GLM_SWIZZLE_TYPE1& b) \
{ \ { \
return FUNCTION(a, b()); \ return FUNCTION(a, b()); \
} }
// //
// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()). // Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).
@ -257,9 +257,9 @@ namespace detail
GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const GLM_SWIZZLE_TYPE1& b, const T& c) \ GLM_FUNC_QUALIFIER typename GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const GLM_SWIZZLE_TYPE1& b, const T& c) \
{ \ { \
return FUNCTION(a, b(), c); \ return FUNCTION(a, b(), c); \
} }
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm
namespace glm namespace glm
@ -292,7 +292,7 @@ namespace glm
//GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot); //GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot);
//GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross); //GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross);
//GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step); //GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step);
//GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix); //GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);
} }
@ -300,7 +300,7 @@ namespace glm
struct { detail::_swizzle<2, T, Q, 0,0,-1,-2> E0 ## E0; }; \ struct { detail::_swizzle<2, T, Q, 0,0,-1,-2> E0 ## E0; }; \
struct { detail::_swizzle<2, T, Q, 0,1,-1,-2> E0 ## E1; }; \ struct { detail::_swizzle<2, T, Q, 0,1,-1,-2> E0 ## E1; }; \
struct { detail::_swizzle<2, T, Q, 1,0,-1,-2> E1 ## E0; }; \ struct { detail::_swizzle<2, T, Q, 1,0,-1,-2> E1 ## E0; }; \
struct { detail::_swizzle<2, T, Q, 1,1,-1,-2> E1 ## E1; }; struct { detail::_swizzle<2, T, Q, 1,1,-1,-2> E1 ## E1; };
#define GLM_SWIZZLE2_3_MEMBERS(T, Q, E0,E1) \ #define GLM_SWIZZLE2_3_MEMBERS(T, Q, E0,E1) \
struct { detail::_swizzle<3,T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \ struct { detail::_swizzle<3,T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
@ -310,7 +310,7 @@ namespace glm
struct { detail::_swizzle<3,T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \ struct { detail::_swizzle<3,T, Q, 1,0,0,-1> E1 ## E0 ## E0; }; \
struct { detail::_swizzle<3,T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \ struct { detail::_swizzle<3,T, Q, 1,0,1,-1> E1 ## E0 ## E1; }; \
struct { detail::_swizzle<3,T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \ struct { detail::_swizzle<3,T, Q, 1,1,0,-1> E1 ## E1 ## E0; }; \
struct { detail::_swizzle<3,T, Q, 1,1,1,-1> E1 ## E1 ## E1; }; struct { detail::_swizzle<3,T, Q, 1,1,1,-1> E1 ## E1 ## E1; };
#define GLM_SWIZZLE2_4_MEMBERS(T, Q, E0,E1) \ #define GLM_SWIZZLE2_4_MEMBERS(T, Q, E0,E1) \
struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ struct { detail::_swizzle<4,T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \
@ -451,7 +451,7 @@ namespace glm
struct { detail::_swizzle<4,T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ struct { detail::_swizzle<4,T, Q, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \
struct { detail::_swizzle<4,T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ struct { detail::_swizzle<4,T, Q, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \
struct { detail::_swizzle<4,T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ struct { detail::_swizzle<4,T, Q, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \
struct { detail::_swizzle<4,T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; struct { detail::_swizzle<4,T, Q, 2,2,2,2> E2 ## E2 ## E2 ## E2; };
#define GLM_SWIZZLE4_2_MEMBERS(T, Q, E0,E1,E2,E3) \ #define GLM_SWIZZLE4_2_MEMBERS(T, Q, E0,E1,E2,E3) \
struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \ struct { detail::_swizzle<2,T, Q, 0,0,-1,-2> E0 ## E0; }; \
@ -469,7 +469,7 @@ namespace glm
struct { detail::_swizzle<2,T, Q, 3,0,-1,-2> E3 ## E0; }; \ struct { detail::_swizzle<2,T, Q, 3,0,-1,-2> E3 ## E0; }; \
struct { detail::_swizzle<2,T, Q, 3,1,-1,-2> E3 ## E1; }; \ struct { detail::_swizzle<2,T, Q, 3,1,-1,-2> E3 ## E1; }; \
struct { detail::_swizzle<2,T, Q, 3,2,-1,-2> E3 ## E2; }; \ struct { detail::_swizzle<2,T, Q, 3,2,-1,-2> E3 ## E2; }; \
struct { detail::_swizzle<2,T, Q, 3,3,-1,-2> E3 ## E3; }; struct { detail::_swizzle<2,T, Q, 3,3,-1,-2> E3 ## E3; };
#define GLM_SWIZZLE4_3_MEMBERS(T, Q, E0,E1,E2,E3) \ #define GLM_SWIZZLE4_3_MEMBERS(T, Q, E0,E1,E2,E3) \
struct { detail::_swizzle<3, T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \ struct { detail::_swizzle<3, T, Q, 0,0,0,-1> E0 ## E0 ## E0; }; \
@ -535,7 +535,7 @@ namespace glm
struct { detail::_swizzle<3, T, Q, 3,3,0,-1> E3 ## E3 ## E0; }; \ struct { detail::_swizzle<3, T, Q, 3,3,0,-1> E3 ## E3 ## E0; }; \
struct { detail::_swizzle<3, T, Q, 3,3,1,-1> E3 ## E3 ## E1; }; \ struct { detail::_swizzle<3, T, Q, 3,3,1,-1> E3 ## E3 ## E1; }; \
struct { detail::_swizzle<3, T, Q, 3,3,2,-1> E3 ## E3 ## E2; }; \ struct { detail::_swizzle<3, T, Q, 3,3,2,-1> E3 ## E3 ## E2; }; \
struct { detail::_swizzle<3, T, Q, 3,3,3,-1> E3 ## E3 ## E3; }; struct { detail::_swizzle<3, T, Q, 3,3,3,-1> E3 ## E3 ## E3; };
#define GLM_SWIZZLE4_4_MEMBERS(T, Q, E0,E1,E2,E3) \ #define GLM_SWIZZLE4_4_MEMBERS(T, Q, E0,E1,E2,E3) \
struct { detail::_swizzle<4, T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ struct { detail::_swizzle<4, T, Q, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \

View File

@ -1,7 +1,7 @@
/// @ref core /// @ref core
/// @file glm/core/dummy.cpp /// @file glm/core/dummy.cpp
/// ///
/// GLM is a header only library. There is nothing to compile. /// GLM is a header only library. There is nothing to compile.
/// dummy.cpp exist only a wordaround for CMake file. /// dummy.cpp exist only a wordaround for CMake file.
/* /*

View File

@ -319,13 +319,13 @@ namespace detail
// sign // sign
// fast and works for any type // fast and works for any type
template<typename genFIType> template<typename genFIType>
GLM_FUNC_QUALIFIER genFIType sign(genFIType x) GLM_FUNC_QUALIFIER genFIType sign(genFIType x)
{ {
GLM_STATIC_ASSERT( GLM_STATIC_ASSERT(
std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer),
"'sign' only accept signed inputs"); "'sign' only accept signed inputs");
return detail::compute_sign<1, genFIType, defaultp, std::numeric_limits<genFIType>::is_iec559, highp>::call(vec<1, genFIType>(x)).x; return detail::compute_sign<1, genFIType, defaultp, std::numeric_limits<genFIType>::is_iec559, highp>::call(vec<1, genFIType>(x)).x;
} }
@ -378,7 +378,7 @@ namespace detail
GLM_FUNC_QUALIFIER genType roundEven(genType x) GLM_FUNC_QUALIFIER genType roundEven(genType x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'roundEven' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'roundEven' only accept floating-point inputs");
int Integer = static_cast<int>(x); int Integer = static_cast<int>(x);
genType IntegerPart = static_cast<genType>(Integer); genType IntegerPart = static_cast<genType>(Integer);
genType FractionalPart = fract(x); genType FractionalPart = fract(x);
@ -391,7 +391,7 @@ namespace detail
{ {
return IntegerPart; return IntegerPart;
} }
else if(x <= static_cast<genType>(0)) // Work around... else if(x <= static_cast<genType>(0)) // Work around...
{ {
return IntegerPart - static_cast<genType>(1); return IntegerPart - static_cast<genType>(1);
} }
@ -622,7 +622,7 @@ namespace detail
# if GLM_HAS_CXX11_STL # if GLM_HAS_CXX11_STL
using std::isnan; using std::isnan;
# else # else
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER bool isnan(genType x) GLM_FUNC_QUALIFIER bool isnan(genType x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isnan' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isnan' only accept floating-point inputs");
@ -661,7 +661,7 @@ namespace detail
# if GLM_HAS_CXX11_STL # if GLM_HAS_CXX11_STL
using std::isinf; using std::isinf;
# else # else
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER bool isinf(genType x) GLM_FUNC_QUALIFIER bool isinf(genType x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs");
@ -775,7 +775,7 @@ namespace detail
{ {
return reinterpret_cast<vec<L, float, Q>&>(const_cast<vec<L, uint, Q>&>(v)); return reinterpret_cast<vec<L, float, Q>&>(const_cast<vec<L, uint, Q>&>(v));
} }
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c) GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c)
{ {

View File

@ -48,7 +48,7 @@ namespace detail
return static_cast<T>(1) / sqrt(x); return static_cast<T>(1) / sqrt(x);
} }
}; };
template<length_t L, bool Aligned> template<length_t L, bool Aligned>
struct compute_inversesqrt<L, float, lowp, Aligned> struct compute_inversesqrt<L, float, lowp, Aligned>
{ {
@ -137,7 +137,7 @@ namespace detail
{ {
return static_cast<genType>(1) / sqrt(x); return static_cast<genType>(1) / sqrt(x);
} }
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<L, T, Q> inversesqrt(vec<L, T, Q> const& x) GLM_FUNC_QUALIFIER vec<L, T, Q> inversesqrt(vec<L, T, Q> const& x)
{ {

View File

@ -22,9 +22,9 @@ namespace detail
__m128i const set2 = _mm_andnot_si128(set0, _mm_set1_epi32(-1)); __m128i const set2 = _mm_andnot_si128(set0, _mm_set1_epi32(-1));
__m128i const and2 = _mm_and_si128(set0, set2); __m128i const and2 = _mm_and_si128(set0, set2);
__m128i const sft2 = _mm_srai_epi32(and2, Shift); __m128i const sft2 = _mm_srai_epi32(and2, Shift);
__m128i const or0 = _mm_or_si128(sft1, sft2); __m128i const or0 = _mm_or_si128(sft1, sft2);
return or0; return or0;
} }
}; };
@ -41,7 +41,7 @@ namespace detail
__m128i const sft0 = _mm_slli_epi32(set0, Shift); __m128i const sft0 = _mm_slli_epi32(set0, Shift);
__m128i const and1 = _mm_and_si128(sft0, set1); __m128i const and1 = _mm_and_si128(sft0, set1);
__m128i const add0 = _mm_add_epi32(and0, and1); __m128i const add0 = _mm_add_epi32(and0, and1);
return add0; return add0;
} }
}; };

View File

@ -95,7 +95,7 @@ namespace glm
return vec4(u.out[0], u.out[1], u.out[2], u.out[3]) * 0.0039215686274509803921568627451f; return vec4(u.out[0], u.out[1], u.out[2], u.out[3]) * 0.0039215686274509803921568627451f;
} }
GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const& v) GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const& v)
{ {
union union
@ -113,7 +113,7 @@ namespace glm
return u.out; return u.out;
} }
GLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint p) GLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint p)
{ {
union union

View File

@ -21,7 +21,7 @@ namespace glm
{ {
return detail::functor1<L, T, T, Q>::call(radians, v); return detail::functor1<L, T, T, Q>::call(radians, v);
} }
// degrees // degrees
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType degrees(genType radians) GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType degrees(genType radians)
@ -155,7 +155,7 @@ namespace glm
# if GLM_HAS_CXX11_STL # if GLM_HAS_CXX11_STL
using std::acosh; using std::acosh;
# else # else
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER genType acosh(genType x) GLM_FUNC_QUALIFIER genType acosh(genType x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acosh' only accept floating-point input"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acosh' only accept floating-point input");
@ -180,7 +180,7 @@ namespace glm
GLM_FUNC_QUALIFIER genType atanh(genType x) GLM_FUNC_QUALIFIER genType atanh(genType x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atanh' only accept floating-point input"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atanh' only accept floating-point input");
if(std::abs(x) >= static_cast<genType>(1)) if(std::abs(x) >= static_cast<genType>(1))
return 0; return 0;
return static_cast<genType>(0.5) * log((static_cast<genType>(1) + x) / (static_cast<genType>(1) - x)); return static_cast<genType>(0.5) * log((static_cast<genType>(1) + x) / (static_cast<genType>(1) - x));

View File

@ -806,7 +806,7 @@ namespace glm
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Check inclusions of different versions of GLM // Check inclusions of different versions of GLM
#elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION)) #elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION))
# error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error." # error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error."
#elif GLM_SETUP_INCLUDED == GLM_VERSION #elif GLM_SETUP_INCLUDED == GLM_VERSION

View File

@ -14,7 +14,7 @@ namespace detail
typedef double float64; typedef double float64;
# endif//GLM_FORCE_SINGLE_ONLY # endif//GLM_FORCE_SINGLE_ONLY
}//namespace detail }//namespace detail
typedef float lowp_float_t; typedef float lowp_float_t;
typedef float mediump_float_t; typedef float mediump_float_t;
typedef double highp_float_t; typedef double highp_float_t;
@ -22,23 +22,23 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// Low qualifier floating-point numbers. /// Low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef lowp_float_t lowp_float; typedef lowp_float_t lowp_float;
/// Medium qualifier floating-point numbers. /// Medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mediump_float_t mediump_float; typedef mediump_float_t mediump_float;
/// High qualifier floating-point numbers. /// High qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.4 Floats</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef highp_float_t highp_float; typedef highp_float_t highp_float;

View File

@ -13,12 +13,12 @@ namespace glm
}; };
typedef std::size_t sizeType; typedef std::size_t sizeType;
namespace detail namespace detail
{ {
template template
< <
typename VALTYPE, typename VALTYPE,
template<typename> class TYPE template<typename> class TYPE
> >
struct genType struct genType
@ -35,7 +35,7 @@ namespace detail
typedef sizeType size_type; typedef sizeType size_type;
static bool is_vector(); static bool is_vector();
static bool is_matrix(); static bool is_matrix();
typedef TYPE<VALTYPE> type; typedef TYPE<VALTYPE> type;
typedef TYPE<VALTYPE> * pointer; typedef TYPE<VALTYPE> * pointer;
typedef TYPE<VALTYPE> const * const_pointer; typedef TYPE<VALTYPE> const * const_pointer;
@ -64,7 +64,7 @@ namespace detail
template template
< <
typename VALTYPE, typename VALTYPE,
template<typename> class TYPE template<typename> class TYPE
> >
bool genType<VALTYPE, TYPE>::is_vector() bool genType<VALTYPE, TYPE>::is_vector()
@ -97,8 +97,8 @@ namespace detail
static bool is_matrix(); static bool is_matrix();
private: private:
// Data // Data
col_type value[colT]; col_type value[colT];
public: public:
////////////////////////////////////// //////////////////////////////////////
@ -135,7 +135,7 @@ namespace detail
class_type& operator-- (); class_type& operator-- ();
}; };
*/ */
//template<typename T> //template<typename T>
//struct traits //struct traits
//{ //{
@ -147,28 +147,28 @@ namespace detail
// static const bool is_genIType = false; // static const bool is_genIType = false;
// static const bool is_genUType = false; // static const bool is_genUType = false;
//}; //};
//template<> //template<>
//struct traits<half> //struct traits<half>
//{ //{
// static const bool is_float = true; // static const bool is_float = true;
// static const bool is_genType = true; // static const bool is_genType = true;
//}; //};
//template<> //template<>
//struct traits<float> //struct traits<float>
//{ //{
// static const bool is_float = true; // static const bool is_float = true;
// static const bool is_genType = true; // static const bool is_genType = true;
//}; //};
//template<> //template<>
//struct traits<double> //struct traits<double>
//{ //{
// static const bool is_float = true; // static const bool is_float = true;
// static const bool is_genType = true; // static const bool is_genType = true;
//}; //};
//template<typename genType> //template<typename genType>
//struct desc //struct desc
//{ //{
@ -180,15 +180,15 @@ namespace detail
// typedef genType & reference; // typedef genType & reference;
// typedef genType const& const_reference; // typedef genType const& const_reference;
// typedef genType const& param_type; // typedef genType const& param_type;
// typedef typename genType::value_type value_type; // typedef typename genType::value_type value_type;
// typedef typename genType::size_type size_type; // typedef typename genType::size_type size_type;
// static const typename size_type value_size; // static const typename size_type value_size;
//}; //};
//template<typename genType> //template<typename genType>
//const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size(); //const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm

View File

@ -174,7 +174,7 @@ typename base<vT, cT, rT, pT>::col_type const& base<vT, cT, rT, pT>::operator[]
// Unary updatable operators // Unary updatable operators
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator=
( (
typename base<vT, cT, rT, pT>::class_type const& x typename base<vT, cT, rT, pT>::class_type const& x
) )
@ -184,7 +184,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
( (
typename base<vT, cT, rT, pT>::T const& x typename base<vT, cT, rT, pT>::T const& x
) )
@ -200,7 +200,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
( (
typename base<vT, cT, rT, pT>::class_type const& x typename base<vT, cT, rT, pT>::class_type const& x
) )
@ -216,7 +216,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
( (
typename base<vT, cT, rT, pT>::T const& x typename base<vT, cT, rT, pT>::T const& x
) )
@ -232,7 +232,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
( (
typename base<vT, cT, rT, pT>::class_type const& x typename base<vT, cT, rT, pT>::class_type const& x
) )
@ -248,7 +248,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
( (
typename base<vT, cT, rT, pT>::T const& x typename base<vT, cT, rT, pT>::T const& x
) )
@ -264,7 +264,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
( (
typename base<vT, cT, rT, pT>::class_type const& x typename base<vT, cT, rT, pT>::class_type const& x
) )
@ -280,7 +280,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/=
( (
typename base<vT, cT, rT, pT>::T const& x typename base<vT, cT, rT, pT>::T const& x
) )
@ -296,7 +296,7 @@ typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/=
} }
template<typename vT, uint cT, uint rT, profile pT> template<typename vT, uint cT, uint rT, profile pT>
typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= typename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/=
( (
typename base<vT, cT, rT, pT>::class_type const& x typename base<vT, cT, rT, pT>::class_type const& x
) )

View File

@ -8,7 +8,7 @@ namespace detail
{ {
volatile float f = 1e10; volatile float f = 1e10;
for(int i = 0; i < 10; ++i) for(int i = 0; i < 10; ++i)
f *= f; // this will overflow before the for loop terminates f *= f; // this will overflow before the for loop terminates
return f; return f;
} }
@ -149,7 +149,7 @@ namespace detail
// whose magnitude is less than __half_NRM_MIN. // whose magnitude is less than __half_NRM_MIN.
// //
// We convert f to a denormalized half. // We convert f to a denormalized half.
// //
m = (m | 0x00800000) >> (1 - e); m = (m | 0x00800000) >> (1 - e);
@ -160,9 +160,9 @@ namespace detail
// our number normalized. Because of the way a half's bits // our number normalized. Because of the way a half's bits
// are laid out, we don't have to treat this case separately; // are laid out, we don't have to treat this case separately;
// the code below will handle it correctly. // the code below will handle it correctly.
// //
if(m & 0x00001000) if(m & 0x00001000)
m += 0x00002000; m += 0x00002000;
// //
@ -188,7 +188,7 @@ namespace detail
// F is a NAN; we produce a half NAN that preserves // F is a NAN; we produce a half NAN that preserves
// the sign bit and the 10 leftmost bits of the // the sign bit and the 10 leftmost bits of the
// significand of f, with one exception: If the 10 // significand of f, with one exception: If the 10
// leftmost bits are all zero, the NAN would turn // leftmost bits are all zero, the NAN would turn
// into an infinity, so we have to set at least one // into an infinity, so we have to set at least one
// bit in the significand. // bit in the significand.
// //

View File

@ -20,7 +20,7 @@ namespace detail
typedef std::int16_t int16; typedef std::int16_t int16;
typedef std::int32_t int32; typedef std::int32_t int32;
typedef std::int64_t int64; typedef std::int64_t int64;
typedef std::uint8_t uint8; typedef std::uint8_t uint8;
typedef std::uint16_t uint16; typedef std::uint16_t uint16;
typedef std::uint32_t uint32; typedef std::uint32_t uint32;
@ -29,41 +29,41 @@ namespace detail
# if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available # if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
typedef int64_t sint64; typedef int64_t sint64;
typedef uint64_t uint64; typedef uint64_t uint64;
# elif GLM_COMPILER & GLM_COMPILER_VC # elif GLM_COMPILER & GLM_COMPILER_VC
typedef signed __int64 sint64; typedef signed __int64 sint64;
typedef unsigned __int64 uint64; typedef unsigned __int64 uint64;
# elif GLM_COMPILER & GLM_COMPILER_GCC # elif GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic ignored "-Wlong-long" # pragma GCC diagnostic ignored "-Wlong-long"
__extension__ typedef signed long long sint64; __extension__ typedef signed long long sint64;
__extension__ typedef unsigned long long uint64; __extension__ typedef unsigned long long uint64;
# elif (GLM_COMPILER & GLM_COMPILER_CLANG) # elif (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic ignored "-Wc++11-long-long" # pragma clang diagnostic ignored "-Wc++11-long-long"
typedef signed long long sint64; typedef signed long long sint64;
typedef unsigned long long uint64; typedef unsigned long long uint64;
# else//unknown compiler # else//unknown compiler
typedef signed long long sint64; typedef signed long long sint64;
typedef unsigned long long uint64; typedef unsigned long long uint64;
# endif//GLM_COMPILER # endif//GLM_COMPILER
typedef signed char int8; typedef signed char int8;
typedef signed short int16; typedef signed short int16;
typedef signed int int32; typedef signed int int32;
typedef sint64 int64; typedef sint64 int64;
typedef unsigned char uint8; typedef unsigned char uint8;
typedef unsigned short uint16; typedef unsigned short uint16;
typedef unsigned int uint32; typedef unsigned int uint32;
typedef uint64 uint64; typedef uint64 uint64;
#endif// #endif//
typedef signed int lowp_int_t; typedef signed int lowp_int_t;
typedef signed int mediump_int_t; typedef signed int mediump_int_t;
typedef signed int highp_int_t; typedef signed int highp_int_t;
typedef unsigned int lowp_uint_t; typedef unsigned int lowp_uint_t;
typedef unsigned int mediump_uint_t; typedef unsigned int mediump_uint_t;
typedef unsigned int highp_uint_t; typedef unsigned int highp_uint_t;
@ -100,7 +100,7 @@ namespace detail
{ {
typedef long type; typedef long type;
}; };
template<> template<>
struct make_signed<unsigned char> struct make_signed<unsigned char>
{ {
@ -182,19 +182,19 @@ namespace detail
{ {
typedef long long type; typedef long long type;
}; };
template<> template<>
struct make_signed<unsigned long long> struct make_signed<unsigned long long>
{ {
typedef long long type; typedef long long type;
}; };
template<> template<>
struct make_unsigned<long long> struct make_unsigned<long long>
{ {
typedef unsigned long long type; typedef unsigned long long type;
}; };
template<> template<>
struct make_unsigned<unsigned long long> struct make_unsigned<unsigned long long>
{ {
@ -207,7 +207,7 @@ namespace detail
typedef detail::int16 int16; typedef detail::int16 int16;
typedef detail::int32 int32; typedef detail::int32 int32;
typedef detail::int64 int64; typedef detail::int64 int64;
typedef detail::uint8 uint8; typedef detail::uint8 uint8;
typedef detail::uint16 uint16; typedef detail::uint16 uint16;
typedef detail::uint32 uint32; typedef detail::uint32 uint32;
@ -216,44 +216,44 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// Low qualifier signed integer. /// Low qualifier signed integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::lowp_int_t lowp_int; typedef detail::lowp_int_t lowp_int;
/// Medium qualifier signed integer. /// Medium qualifier signed integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::mediump_int_t mediump_int; typedef detail::mediump_int_t mediump_int;
/// High qualifier signed integer. /// High qualifier signed integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::highp_int_t highp_int; typedef detail::highp_int_t highp_int;
/// Low qualifier unsigned integer. /// Low qualifier unsigned integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::lowp_uint_t lowp_uint; typedef detail::lowp_uint_t lowp_uint;
/// Medium qualifier unsigned integer. /// Medium qualifier unsigned integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::mediump_uint_t mediump_uint; typedef detail::mediump_uint_t mediump_uint;
/// High qualifier unsigned integer. /// High qualifier unsigned integer.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef detail::highp_uint_t highp_uint; typedef detail::highp_uint_t highp_uint;
@ -283,7 +283,7 @@ namespace detail
#endif #endif
/// Unsigned integer type. /// Unsigned integer type.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.3 Integers</a>
typedef unsigned int uint; typedef unsigned int uint;

View File

@ -29,308 +29,308 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 2 components matrix of low qualifier floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, lowp> lowp_mat2; typedef mat<2, 2, float, lowp> lowp_mat2;
/// 2 columns of 2 components matrix of medium qualifier floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, mediump> mediump_mat2; typedef mat<2, 2, float, mediump> mediump_mat2;
/// 2 columns of 2 components matrix of high qualifier floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, highp> highp_mat2; typedef mat<2, 2, float, highp> highp_mat2;
/// 2 columns of 2 components matrix of low qualifier floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, lowp> lowp_mat2x2; typedef mat<2, 2, float, lowp> lowp_mat2x2;
/// 2 columns of 2 components matrix of medium qualifier floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, mediump> mediump_mat2x2; typedef mat<2, 2, float, mediump> mediump_mat2x2;
/// 2 columns of 2 components matrix of high qualifier floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, float, highp> highp_mat2x2; typedef mat<2, 2, float, highp> highp_mat2x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 3 components matrix of low qualifier floating-point numbers. /// 2 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, float, lowp> lowp_mat2x3; typedef mat<2, 3, float, lowp> lowp_mat2x3;
/// 2 columns of 3 components matrix of medium qualifier floating-point numbers. /// 2 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, float, mediump> mediump_mat2x3; typedef mat<2, 3, float, mediump> mediump_mat2x3;
/// 2 columns of 3 components matrix of high qualifier floating-point numbers. /// 2 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, float, highp> highp_mat2x3; typedef mat<2, 3, float, highp> highp_mat2x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 4 components matrix of low qualifier floating-point numbers. /// 2 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, float, lowp> lowp_mat2x4; typedef mat<2, 4, float, lowp> lowp_mat2x4;
/// 2 columns of 4 components matrix of medium qualifier floating-point numbers. /// 2 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, float, mediump> mediump_mat2x4; typedef mat<2, 4, float, mediump> mediump_mat2x4;
/// 2 columns of 4 components matrix of high qualifier floating-point numbers. /// 2 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, float, highp> highp_mat2x4; typedef mat<2, 4, float, highp> highp_mat2x4;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 2 components matrix of low qualifier floating-point numbers. /// 3 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, float, lowp> lowp_mat3x2; typedef mat<3, 2, float, lowp> lowp_mat3x2;
/// 3 columns of 2 components matrix of medium qualifier floating-point numbers. /// 3 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, float, mediump> mediump_mat3x2; typedef mat<3, 2, float, mediump> mediump_mat3x2;
/// 3 columns of 2 components matrix of high qualifier floating-point numbers. /// 3 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, float, highp> highp_mat3x2; typedef mat<3, 2, float, highp> highp_mat3x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 3 components matrix of low qualifier floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, lowp> lowp_mat3; typedef mat<3, 3, float, lowp> lowp_mat3;
/// 3 columns of 3 components matrix of medium qualifier floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, mediump> mediump_mat3; typedef mat<3, 3, float, mediump> mediump_mat3;
/// 3 columns of 3 components matrix of high qualifier floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, highp> highp_mat3; typedef mat<3, 3, float, highp> highp_mat3;
/// 3 columns of 3 components matrix of low qualifier floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, lowp> lowp_mat3x3; typedef mat<3, 3, float, lowp> lowp_mat3x3;
/// 3 columns of 3 components matrix of medium qualifier floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, mediump> mediump_mat3x3; typedef mat<3, 3, float, mediump> mediump_mat3x3;
/// 3 columns of 3 components matrix of high qualifier floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, highp> highp_mat3x3; typedef mat<3, 3, float, highp> highp_mat3x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 4 components matrix of low qualifier floating-point numbers. /// 3 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, float, lowp> lowp_mat3x4; typedef mat<3, 4, float, lowp> lowp_mat3x4;
/// 3 columns of 4 components matrix of medium qualifier floating-point numbers. /// 3 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, float, mediump> mediump_mat3x4; typedef mat<3, 4, float, mediump> mediump_mat3x4;
/// 3 columns of 4 components matrix of high qualifier floating-point numbers. /// 3 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, float, highp> highp_mat3x4; typedef mat<3, 4, float, highp> highp_mat3x4;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 2 components matrix of low qualifier floating-point numbers. /// 4 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, float, lowp> lowp_mat4x2; typedef mat<4, 2, float, lowp> lowp_mat4x2;
/// 4 columns of 2 components matrix of medium qualifier floating-point numbers. /// 4 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, float, mediump> mediump_mat4x2; typedef mat<4, 2, float, mediump> mediump_mat4x2;
/// 4 columns of 2 components matrix of high qualifier floating-point numbers. /// 4 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, float, highp> highp_mat4x2; typedef mat<4, 2, float, highp> highp_mat4x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 3 components matrix of low qualifier floating-point numbers. /// 4 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, float, lowp> lowp_mat4x3; typedef mat<4, 3, float, lowp> lowp_mat4x3;
/// 4 columns of 3 components matrix of medium qualifier floating-point numbers. /// 4 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, float, mediump> mediump_mat4x3; typedef mat<4, 3, float, mediump> mediump_mat4x3;
/// 4 columns of 3 components matrix of high qualifier floating-point numbers. /// 4 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, float, highp> highp_mat4x3; typedef mat<4, 3, float, highp> highp_mat4x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 4 components matrix of low qualifier floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, lowp> lowp_mat4; typedef mat<4, 4, float, lowp> lowp_mat4;
/// 4 columns of 4 components matrix of medium qualifier floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, mediump> mediump_mat4; typedef mat<4, 4, float, mediump> mediump_mat4;
/// 4 columns of 4 components matrix of high qualifier floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, highp> highp_mat4; typedef mat<4, 4, float, highp> highp_mat4;
/// 4 columns of 4 components matrix of low qualifier floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, lowp> lowp_mat4x4; typedef mat<4, 4, float, lowp> lowp_mat4x4;
/// 4 columns of 4 components matrix of medium qualifier floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, mediump> mediump_mat4x4; typedef mat<4, 4, float, mediump> mediump_mat4x4;
/// 4 columns of 4 components matrix of high qualifier floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual qualifier. /// There is no guarantee on the actual qualifier.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, float, highp> highp_mat4x4; typedef mat<4, 4, float, highp> highp_mat4x4;
/// @} /// @}
/// @addtogroup core_types /// @addtogroup core_types
/// @{ /// @{
////////////////////////// //////////////////////////
// Float definition // Float definition
#if(defined(GLM_PRECISION_LOWP_FLOAT)) #if(defined(GLM_PRECISION_LOWP_FLOAT))
typedef lowp_mat2x2 mat2x2; typedef lowp_mat2x2 mat2x2;
typedef lowp_mat2x3 mat2x3; typedef lowp_mat2x3 mat2x3;
@ -351,333 +351,333 @@ namespace detail
typedef mediump_mat4x2 mat4x2; typedef mediump_mat4x2 mat4x2;
typedef mediump_mat4x3 mat4x3; typedef mediump_mat4x3 mat4x3;
typedef mediump_mat4x4 mat4x4; typedef mediump_mat4x4 mat4x4;
#else #else
//! 2 columns of 2 components matrix of floating-point numbers. //! 2 columns of 2 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat2x2 mat2x2; typedef highp_mat2x2 mat2x2;
//! 2 columns of 3 components matrix of floating-point numbers. //! 2 columns of 3 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat2x3 mat2x3; typedef highp_mat2x3 mat2x3;
//! 2 columns of 4 components matrix of floating-point numbers. //! 2 columns of 4 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat2x4 mat2x4; typedef highp_mat2x4 mat2x4;
//! 3 columns of 2 components matrix of floating-point numbers. //! 3 columns of 2 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat3x2 mat3x2; typedef highp_mat3x2 mat3x2;
//! 3 columns of 3 components matrix of floating-point numbers. //! 3 columns of 3 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat3x3 mat3x3; typedef highp_mat3x3 mat3x3;
//! 3 columns of 4 components matrix of floating-point numbers. //! 3 columns of 4 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat3x4 mat3x4; typedef highp_mat3x4 mat3x4;
//! 4 columns of 2 components matrix of floating-point numbers. //! 4 columns of 2 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat4x2 mat4x2; typedef highp_mat4x2 mat4x2;
//! 4 columns of 3 components matrix of floating-point numbers. //! 4 columns of 3 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat4x3 mat4x3; typedef highp_mat4x3 mat4x3;
//! 4 columns of 4 components matrix of floating-point numbers. //! 4 columns of 4 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_mat4x4 mat4x4; typedef highp_mat4x4 mat4x4;
#endif//GLM_PRECISION #endif//GLM_PRECISION
//! 2 columns of 2 components matrix of floating-point numbers. //! 2 columns of 2 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef mat2x2 mat2; typedef mat2x2 mat2;
//! 3 columns of 3 components matrix of floating-point numbers. //! 3 columns of 3 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef mat3x3 mat3; typedef mat3x3 mat3;
//! 4 columns of 4 components matrix of floating-point numbers. //! 4 columns of 4 components matrix of floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef mat4x4 mat4; typedef mat4x4 mat4;
////////////////////////// //////////////////////////
// Double definition // Double definition
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 2 components matrix of low qualifier floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, lowp> lowp_dmat2; typedef mat<2, 2, double, lowp> lowp_dmat2;
/// 2 columns of 2 components matrix of medium qualifier floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, mediump> mediump_dmat2; typedef mat<2, 2, double, mediump> mediump_dmat2;
/// 2 columns of 2 components matrix of high qualifier floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, highp> highp_dmat2; typedef mat<2, 2, double, highp> highp_dmat2;
/// 2 columns of 2 components matrix of low qualifier floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, lowp> lowp_dmat2x2; typedef mat<2, 2, double, lowp> lowp_dmat2x2;
/// 2 columns of 2 components matrix of medium qualifier floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, mediump> mediump_dmat2x2; typedef mat<2, 2, double, mediump> mediump_dmat2x2;
/// 2 columns of 2 components matrix of high qualifier floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 2, double, highp> highp_dmat2x2; typedef mat<2, 2, double, highp> highp_dmat2x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 3 components matrix of low qualifier floating-point numbers. /// 2 columns of 3 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, double, lowp> lowp_dmat2x3; typedef mat<2, 3, double, lowp> lowp_dmat2x3;
/// 2 columns of 3 components matrix of medium qualifier floating-point numbers. /// 2 columns of 3 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, double, mediump> mediump_dmat2x3; typedef mat<2, 3, double, mediump> mediump_dmat2x3;
/// 2 columns of 3 components matrix of high qualifier floating-point numbers. /// 2 columns of 3 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 3, double, highp> highp_dmat2x3; typedef mat<2, 3, double, highp> highp_dmat2x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 4 components matrix of low qualifier floating-point numbers. /// 2 columns of 4 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, double, lowp> lowp_dmat2x4; typedef mat<2, 4, double, lowp> lowp_dmat2x4;
/// 2 columns of 4 components matrix of medium qualifier floating-point numbers. /// 2 columns of 4 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, double, mediump> mediump_dmat2x4; typedef mat<2, 4, double, mediump> mediump_dmat2x4;
/// 2 columns of 4 components matrix of high qualifier floating-point numbers. /// 2 columns of 4 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<2, 4, double, highp> highp_dmat2x4; typedef mat<2, 4, double, highp> highp_dmat2x4;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 2 components matrix of low qualifier floating-point numbers. /// 3 columns of 2 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, double, lowp> lowp_dmat3x2; typedef mat<3, 2, double, lowp> lowp_dmat3x2;
/// 3 columns of 2 components matrix of medium qualifier floating-point numbers. /// 3 columns of 2 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, double, mediump> mediump_dmat3x2; typedef mat<3, 2, double, mediump> mediump_dmat3x2;
/// 3 columns of 2 components matrix of high qualifier floating-point numbers. /// 3 columns of 2 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 2, double, highp> highp_dmat3x2; typedef mat<3, 2, double, highp> highp_dmat3x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 3 components matrix of low qualifier floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, float, lowp> lowp_dmat3; typedef mat<3, 3, float, lowp> lowp_dmat3;
/// 3 columns of 3 components matrix of medium qualifier floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, double, mediump> mediump_dmat3; typedef mat<3, 3, double, mediump> mediump_dmat3;
/// 3 columns of 3 components matrix of high qualifier floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, double, highp> highp_dmat3; typedef mat<3, 3, double, highp> highp_dmat3;
/// 3 columns of 3 components matrix of low qualifier floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, double, lowp> lowp_dmat3x3; typedef mat<3, 3, double, lowp> lowp_dmat3x3;
/// 3 columns of 3 components matrix of medium qualifier floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, double, mediump> mediump_dmat3x3; typedef mat<3, 3, double, mediump> mediump_dmat3x3;
/// 3 columns of 3 components matrix of high qualifier floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 3, double, highp> highp_dmat3x3; typedef mat<3, 3, double, highp> highp_dmat3x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 4 components matrix of low qualifier floating-point numbers. /// 3 columns of 4 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, double, lowp> lowp_dmat3x4; typedef mat<3, 4, double, lowp> lowp_dmat3x4;
/// 3 columns of 4 components matrix of medium qualifier floating-point numbers. /// 3 columns of 4 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, double, mediump> mediump_dmat3x4; typedef mat<3, 4, double, mediump> mediump_dmat3x4;
/// 3 columns of 4 components matrix of high qualifier floating-point numbers. /// 3 columns of 4 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<3, 4, double, highp> highp_dmat3x4; typedef mat<3, 4, double, highp> highp_dmat3x4;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 2 components matrix of low qualifier floating-point numbers. /// 4 columns of 2 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, double, lowp> lowp_dmat4x2; typedef mat<4, 2, double, lowp> lowp_dmat4x2;
/// 4 columns of 2 components matrix of medium qualifier floating-point numbers. /// 4 columns of 2 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, double, mediump> mediump_dmat4x2; typedef mat<4, 2, double, mediump> mediump_dmat4x2;
/// 4 columns of 2 components matrix of high qualifier floating-point numbers. /// 4 columns of 2 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 2, double, highp> highp_dmat4x2; typedef mat<4, 2, double, highp> highp_dmat4x2;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 3 components matrix of low qualifier floating-point numbers. /// 4 columns of 3 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, double, lowp> lowp_dmat4x3; typedef mat<4, 3, double, lowp> lowp_dmat4x3;
/// 4 columns of 3 components matrix of medium qualifier floating-point numbers. /// 4 columns of 3 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, double, mediump> mediump_dmat4x3; typedef mat<4, 3, double, mediump> mediump_dmat4x3;
/// 4 columns of 3 components matrix of high qualifier floating-point numbers. /// 4 columns of 3 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 3, double, highp> highp_dmat4x3; typedef mat<4, 3, double, highp> highp_dmat4x3;
/// @} /// @}
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 4 components matrix of low qualifier floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, lowp> lowp_dmat4; typedef mat<4, 4, double, lowp> lowp_dmat4;
/// 4 columns of 4 components matrix of medium qualifier floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, mediump> mediump_dmat4; typedef mat<4, 4, double, mediump> mediump_dmat4;
/// 4 columns of 4 components matrix of high qualifier floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, highp> highp_dmat4; typedef mat<4, 4, double, highp> highp_dmat4;
/// 4 columns of 4 components matrix of low qualifier floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, lowp> lowp_dmat4x4; typedef mat<4, 4, double, lowp> lowp_dmat4x4;
/// 4 columns of 4 components matrix of medium qualifier floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, mediump> mediump_dmat4x4; typedef mat<4, 4, double, mediump> mediump_dmat4x4;
/// 4 columns of 4 components matrix of high qualifier floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
typedef mat<4, 4, double, highp> highp_dmat4x4; typedef mat<4, 4, double, highp> highp_dmat4x4;
/// @} /// @}
#if(defined(GLM_PRECISION_LOWP_DOUBLE)) #if(defined(GLM_PRECISION_LOWP_DOUBLE))
typedef lowp_dmat2x2 dmat2x2; typedef lowp_dmat2x2 dmat2x2;
typedef lowp_dmat2x3 dmat2x3; typedef lowp_dmat2x3 dmat2x3;
@ -699,68 +699,68 @@ namespace detail
typedef mediump_dmat4x3 dmat4x3; typedef mediump_dmat4x3 dmat4x3;
typedef mediump_dmat4x4 dmat4x4; typedef mediump_dmat4x4 dmat4x4;
#else //defined(GLM_PRECISION_HIGHP_DOUBLE) #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
//! 2 * 2 matrix of double-qualifier floating-point numbers. //! 2 * 2 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat2x2 dmat2; typedef highp_dmat2x2 dmat2;
//! 3 * 3 matrix of double-qualifier floating-point numbers. //! 3 * 3 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat3x3 dmat3; typedef highp_dmat3x3 dmat3;
//! 4 * 4 matrix of double-qualifier floating-point numbers. //! 4 * 4 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat4x4 dmat4; typedef highp_dmat4x4 dmat4;
//! 2 * 2 matrix of double-qualifier floating-point numbers. //! 2 * 2 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat2x2 dmat2x2; typedef highp_dmat2x2 dmat2x2;
//! 2 * 3 matrix of double-qualifier floating-point numbers. //! 2 * 3 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat2x3 dmat2x3; typedef highp_dmat2x3 dmat2x3;
//! 2 * 4 matrix of double-qualifier floating-point numbers. //! 2 * 4 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat2x4 dmat2x4; typedef highp_dmat2x4 dmat2x4;
//! 3 * 2 matrix of double-qualifier floating-point numbers. //! 3 * 2 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat3x2 dmat3x2; typedef highp_dmat3x2 dmat3x2;
/// 3 * 3 matrix of double-qualifier floating-point numbers. /// 3 * 3 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat3x3 dmat3x3; typedef highp_dmat3x3 dmat3x3;
/// 3 * 4 matrix of double-qualifier floating-point numbers. /// 3 * 4 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat3x4 dmat3x4; typedef highp_dmat3x4 dmat3x4;
/// 4 * 2 matrix of double-qualifier floating-point numbers. /// 4 * 2 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat4x2 dmat4x2; typedef highp_dmat4x2 dmat4x2;
/// 4 * 3 matrix of double-qualifier floating-point numbers. /// 4 * 3 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat4x3 dmat4x3; typedef highp_dmat4x3 dmat4x3;
/// 4 * 4 matrix of double-qualifier floating-point numbers. /// 4 * 4 matrix of double-qualifier floating-point numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
typedef highp_dmat4x4 dmat4x4; typedef highp_dmat4x4 dmat4x4;
#endif//GLM_PRECISION #endif//GLM_PRECISION
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -38,7 +38,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat
( (
T const& x0, T const& y0, T const& x0, T const& y0,
T const& x1, T const& y1 T const& x1, T const& y1
@ -59,7 +59,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename X1, typename Y1, typename X2, typename Y2> template<typename X1, typename Y1, typename X2, typename Y2>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat
( (
X1 const& x1, Y1 const& y1, X1 const& x1, Y1 const& y1,
X2 const& x2, Y2 const& y2 X2 const& x2, Y2 const& y2
@ -68,7 +68,7 @@ namespace glm
this->value[0] = col_type(static_cast<T>(x1), value_type(y1)); this->value[0] = col_type(static_cast<T>(x1), value_type(y1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2)); this->value[1] = col_type(static_cast<T>(x2), value_type(y2));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat(vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2) GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat(vec<2, V1, Q> const& v1, vec<2, V2, Q> const& v2)
@ -101,7 +101,7 @@ namespace glm
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, Q>::mat(mat<2, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -294,7 +294,7 @@ namespace glm
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator-(mat<2, 2, T, Q> const& m)
{ {
return mat<2, 2, T, Q>( return mat<2, 2, T, Q>(
-m[0], -m[0],
-m[1]); -m[1]);
} }
@ -424,7 +424,7 @@ namespace glm
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]); m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m, T scalar)
{ {
return mat<2, 2, T, Q>( return mat<2, 2, T, Q>(
@ -432,7 +432,7 @@ namespace glm
m[1] / scalar); m[1] / scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(T scalar, mat<2, 2, T, Q> const& m)
{ {
return mat<2, 2, T, Q>( return mat<2, 2, T, Q>(
@ -454,7 +454,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<2, 2, T, Q> operator/(mat<2, 2, T, Q> const& m1, mat<2, 2, T, Q> const& m2)
{ {
mat<2, 2, T, Q> m1_copy(m1); mat<2, 2, T, Q> m1_copy(m1);
return m1_copy /= m2; return m1_copy /= m2;
} }

View File

@ -28,15 +28,15 @@ namespace glm
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0); this->value[0] = col_type(scalar, 0, 0);
this->value[1] = col_type(0, scalar, 0); this->value[1] = col_type(0, scalar, 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat
( (
T x0, T y0, T z0, T x0, T y0, T z0,
T x1, T y1, T z1 T x1, T y1, T z1
@ -46,7 +46,7 @@ namespace glm
this->value[1] = col_type(x1, y1, z1); this->value[1] = col_type(x1, y1, z1);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(col_type const& v0, col_type const& v1)
{ {
this->value[0] = v0; this->value[0] = v0;
@ -59,7 +59,7 @@ namespace glm
template< template<
typename X1, typename Y1, typename Z1, typename X1, typename Y1, typename Z1,
typename X2, typename Y2, typename Z2> typename X2, typename Y2, typename Z2>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, X1 x1, Y1 y1, Z1 z1,
X2 x2, Y2 y2, Z2 z2 X2 x2, Y2 y2, Z2 z2
@ -68,7 +68,7 @@ namespace glm
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1)); this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2)); this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(vec<3, V1, Q> const& v1, vec<3, V2, Q> const& v2)
@ -87,56 +87,56 @@ namespace glm
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 3, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<2, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<3, 4, T, Q> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
this->value[1] = col_type(m[1]); this->value[1] = col_type(m[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 2, T, Q> const& m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
this->value[1] = col_type(m[1], 0); this->value[1] = col_type(m[1], 0);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 3, T, Q>::mat(mat<4, 3, T, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -286,7 +286,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m, T scalar)
{ {
return mat<2, 3, T, Q>( return mat<2, 3, T, Q>(
@ -294,7 +294,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator+(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
{ {
return mat<2, 3, T, Q>( return mat<2, 3, T, Q>(
@ -302,7 +302,7 @@ namespace glm
m1[1] + m2[1]); m1[1] + m2[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m, T scalar)
{ {
return mat<2, 3, T, Q>( return mat<2, 3, T, Q>(
@ -310,7 +310,7 @@ namespace glm
m[1] - scalar); m[1] - scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator-(mat<2, 3, T, Q> const& m1, mat<2, 3, T, Q> const& m2)
{ {
return mat<2, 3, T, Q>( return mat<2, 3, T, Q>(
@ -318,7 +318,7 @@ namespace glm
m1[1] - m2[1]); m1[1] - m2[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, Q> operator*(mat<2, 3, T, Q> const& m, T scalar)
{ {
return mat<2, 3, T, Q>( return mat<2, 3, T, Q>(

View File

@ -69,7 +69,7 @@ namespace glm
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1)); this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2)); this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2) GLM_FUNC_QUALIFIER mat<2, 4, T, Q>::mat(vec<4, V1, Q> const& v1, vec<4, V2, Q> const& v2)
@ -281,7 +281,7 @@ namespace glm
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m)
{ {
return mat<2, 4, T, Q>( return mat<2, 4, T, Q>(
-m[0], -m[0],
-m[1]); -m[1]);
} }
@ -295,7 +295,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator+(mat<2, 4, T, Q> const& m1, mat<2, 4, T, Q> const& m2)
{ {
return mat<2, 4, T, Q>( return mat<2, 4, T, Q>(
@ -303,7 +303,7 @@ namespace glm
m1[1] + m2[1]); m1[1] + m2[1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator-(mat<2, 4, T, Q> const& m, T scalar)
{ {
return mat<2, 4, T, Q>( return mat<2, 4, T, Q>(
@ -327,7 +327,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator*(T scalar, mat<2, 4, T, Q> const& m)
{ {
return mat<2, 4, T, Q>( return mat<2, 4, T, Q>(
@ -426,7 +426,7 @@ namespace glm
m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]); m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, Q> operator/(mat<2, 4, T, Q> const& m, T scalar)
{ {
return mat<2, 4, T, Q>( return mat<2, 4, T, Q>(

View File

@ -6,7 +6,7 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q>::mat() GLM_FUNC_QUALIFIER mat<3, 2, T, Q>::mat()
{} {}
# endif # endif
@ -315,7 +315,7 @@ namespace glm
return m; return m;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m)
{ {
return mat<3, 2, T, Q>( return mat<3, 2, T, Q>(
@ -353,7 +353,7 @@ namespace glm
m[2] - scalar); m[2] - scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator-(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
{ {
return mat<3, 2, T, Q>( return mat<3, 2, T, Q>(
@ -362,7 +362,7 @@ namespace glm
m1[2] - m2[2]); m1[2] - m2[2]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(mat<3, 2, T, Q> const& m, T scalar)
{ {
return mat<3, 2, T, Q>( return mat<3, 2, T, Q>(
@ -371,7 +371,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator*(T scalar, mat<3, 2, T, Q> const& m)
{ {
return mat<3, 2, T, Q>( return mat<3, 2, T, Q>(
@ -379,7 +379,7 @@ namespace glm
m[1] * scalar, m[1] * scalar,
m[2] * scalar); m[2] * scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v) GLM_FUNC_QUALIFIER typename mat<3, 2, T, Q>::col_type operator*(mat<3, 2, T, Q> const& m, typename mat<3, 2, T, Q>::row_type const& v)
{ {
@ -457,7 +457,7 @@ namespace glm
m[2] / scalar); m[2] / scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 2, T, Q> operator/(T scalar, mat<3, 2, T, Q> const& m)
{ {
return mat<3, 2, T, Q>( return mat<3, 2, T, Q>(
@ -474,7 +474,7 @@ namespace glm
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2) GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, Q> const& m1, mat<3, 2, T, Q> const& m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);

View File

@ -84,7 +84,7 @@ namespace glm
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2)); this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3)); this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q>::mat GLM_FUNC_QUALIFIER mat<3, 3, T, Q>::mat
@ -335,14 +335,14 @@ namespace glm
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
-m[0], -m[0],
-m[1], -m[1],
-m[2]); -m[2]);
} }
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m, T scalar)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -351,7 +351,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(T scalar, mat<3, 3, T, Q> const& m)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -360,7 +360,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator+(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -369,7 +369,7 @@ namespace glm
m1[2] + m2[2]); m1[2] + m2[2]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m, T scalar)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -378,7 +378,7 @@ namespace glm
m[2] - scalar); m[2] - scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(T scalar, mat<3, 3, T, Q> const& m)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -387,7 +387,7 @@ namespace glm
scalar - m[2]); scalar - m[2]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator-(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -396,7 +396,7 @@ namespace glm
m1[2] - m2[2]); m1[2] - m2[2]);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m, T scalar)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -405,7 +405,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(T scalar, mat<3, 3, T, Q> const& m)
{ {
return mat<3, 3, T, Q>( return mat<3, 3, T, Q>(
@ -414,7 +414,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v) GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::col_type operator*(mat<3, 3, T, Q> const& m, typename mat<3, 3, T, Q>::row_type const& v)
{ {
return typename mat<3, 3, T, Q>::col_type( return typename mat<3, 3, T, Q>::col_type(
@ -423,7 +423,7 @@ namespace glm
m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z); m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m) GLM_FUNC_QUALIFIER typename mat<3, 3, T, Q>::row_type operator*(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
{ {
return typename mat<3, 3, T, Q>::row_type( return typename mat<3, 3, T, Q>::row_type(
@ -432,7 +432,7 @@ namespace glm
m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z); m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2) GLM_FUNC_QUALIFIER mat<3, 3, T, Q> operator*(mat<3, 3, T, Q> const& m1, mat<3, 3, T, Q> const& m2)
{ {
T const SrcA00 = m1[0][0]; T const SrcA00 = m1[0][0];

View File

@ -39,7 +39,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat
( (
T x0, T y0, T z0, T w0, T x0, T y0, T z0, T w0,
T x1, T y1, T z1, T w1, T x1, T y1, T z1, T w1,
@ -52,7 +52,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat
( (
col_type const& v0, col_type const& v0,
col_type const& v1, col_type const& v1,
@ -71,7 +71,7 @@ namespace glm
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
typename X3, typename Y3, typename Z3, typename W3> typename X3, typename Y3, typename Z3, typename W3>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat
( (
X1 x1, Y1 y1, Z1 z1, W1 w1, X1 x1, Y1 y1, Z1 z1, W1 w1,
X2 x2, Y2 y2, Z2 z2, W2 w2, X2 x2, Y2 y2, Z2 z2, W2 w2,
@ -82,10 +82,10 @@ namespace glm
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2)); this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3)); this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, Q>::mat
( (
vec<4, V1, Q> const& v1, vec<4, V1, Q> const& v1,
vec<4, V2, Q> const& v2, vec<4, V2, Q> const& v2,
@ -96,7 +96,7 @@ namespace glm
this->value[1] = col_type(v2); this->value[1] = col_type(v2);
this->value[2] = col_type(v3); this->value[2] = col_type(v3);
} }
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -201,8 +201,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator=(mat<3, 4, U, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator=(mat<3, 4, U, Q> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -211,8 +211,8 @@ namespace glm
return *this; return *this;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(U s) GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(U s)
{ {
this->value[0] += s; this->value[0] += s;
@ -221,8 +221,8 @@ namespace glm
return *this; return *this;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(mat<3, 4, U, Q> const& m) GLM_FUNC_QUALIFIER mat<3, 4, T, Q>& mat<3, 4, T, Q>::operator+=(mat<3, 4, U, Q> const& m)
{ {
this->value[0] += m[0]; this->value[0] += m[0];

View File

@ -6,7 +6,7 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 2, T, Q>::mat() GLM_FUNC_QUALIFIER mat<4, 2, T, Q>::mat()
{} {}
# endif # endif
@ -92,7 +92,7 @@ namespace glm
this->value[2] = col_type(static_cast<T>(x3), value_type(y3)); this->value[2] = col_type(static_cast<T>(x3), value_type(y3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4)); this->value[3] = col_type(static_cast<T>(x4), value_type(y4));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER mat<4, 2, T, Q>::mat GLM_FUNC_QUALIFIER mat<4, 2, T, Q>::mat

View File

@ -92,7 +92,7 @@ namespace glm
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3)); this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4)); this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER mat<4, 3, T, Q>::mat GLM_FUNC_QUALIFIER mat<4, 3, T, Q>::mat

View File

@ -85,7 +85,7 @@ namespace glm
// -- Conversions -- // -- Conversions --
template<typename T, qualifier Q> template<typename T, qualifier Q>
template< template<
typename X1, typename Y1, typename Z1, typename W1, typename X1, typename Y1, typename Z1, typename W1,
typename X2, typename Y2, typename Z2, typename W2, typename X2, typename Y2, typename Z2, typename W2,
@ -124,7 +124,7 @@ namespace glm
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3)); this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4)); this->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4));
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename V1, typename V2, typename V3, typename V4> template<typename V1, typename V2, typename V3, typename V4>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q>::mat GLM_FUNC_QUALIFIER mat<4, 4, T, Q>::mat
@ -133,7 +133,7 @@ namespace glm
vec<4, V2, Q> const& v2, vec<4, V2, Q> const& v2,
vec<4, V3, Q> const& v3, vec<4, V3, Q> const& v3,
vec<4, V4, Q> const& v4 vec<4, V4, Q> const& v4
) )
{ {
GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
GLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); GLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
@ -252,8 +252,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator=(mat<4, 4, U, Q> const& m) GLM_FUNC_QUALIFIER mat<4, 4, T, Q>& mat<4, 4, T, Q>::operator=(mat<4, 4, U, Q> const& m)
{ {
//memcpy could be faster //memcpy could be faster

View File

@ -33,7 +33,7 @@ namespace detail
GLM_ALIGNED_STORAGE_TYPE_STRUCT(16) GLM_ALIGNED_STORAGE_TYPE_STRUCT(16)
GLM_ALIGNED_STORAGE_TYPE_STRUCT(32) GLM_ALIGNED_STORAGE_TYPE_STRUCT(32)
GLM_ALIGNED_STORAGE_TYPE_STRUCT(64) GLM_ALIGNED_STORAGE_TYPE_STRUCT(64)
# if GLM_ARCH & GLM_ARCH_SSE2_BIT # if GLM_ARCH & GLM_ARCH_SSE2_BIT
template<> template<>
struct storage<float, 16, true> struct storage<float, 16, true>

View File

@ -85,7 +85,7 @@ namespace glm
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator=(vec<1, U, Q> const& v)
{ {
this->x = static_cast<T>(v.x); this->x = static_cast<T>(v.x);
@ -93,7 +93,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator+=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator+=(U scalar)
{ {
this->x += static_cast<T>(scalar); this->x += static_cast<T>(scalar);
@ -101,7 +101,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator+=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator+=(vec<1, U, Q> const& v)
{ {
this->x += static_cast<T>(v.x); this->x += static_cast<T>(v.x);
@ -109,7 +109,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator-=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator-=(U scalar)
{ {
this->x -= static_cast<T>(scalar); this->x -= static_cast<T>(scalar);
@ -117,7 +117,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator-=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator-=(vec<1, U, Q> const& v)
{ {
this->x -= static_cast<T>(v.x); this->x -= static_cast<T>(v.x);
@ -125,7 +125,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator*=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator*=(U scalar)
{ {
this->x *= static_cast<T>(scalar); this->x *= static_cast<T>(scalar);
@ -133,7 +133,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator*=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator*=(vec<1, U, Q> const& v)
{ {
this->x *= static_cast<T>(v.x); this->x *= static_cast<T>(v.x);
@ -141,7 +141,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator/=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator/=(U scalar)
{ {
this->x /= static_cast<T>(scalar); this->x /= static_cast<T>(scalar);
@ -149,7 +149,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator/=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator/=(vec<1, U, Q> const& v)
{ {
this->x /= static_cast<T>(v.x); this->x /= static_cast<T>(v.x);
@ -172,7 +172,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> vec<1, T, Q>::operator++(int) GLM_FUNC_QUALIFIER vec<1, T, Q> vec<1, T, Q>::operator++(int)
{ {
vec<1, T, Q> Result(*this); vec<1, T, Q> Result(*this);
@ -180,7 +180,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> vec<1, T, Q>::operator--(int) GLM_FUNC_QUALIFIER vec<1, T, Q> vec<1, T, Q>::operator--(int)
{ {
vec<1, T, Q> Result(*this); vec<1, T, Q> Result(*this);
@ -191,7 +191,7 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator%=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator%=(U scalar)
{ {
this->x %= static_cast<T>(scalar); this->x %= static_cast<T>(scalar);
@ -199,7 +199,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator%=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator%=(vec<1, U, Q> const& v)
{ {
this->x %= static_cast<T>(v.x); this->x %= static_cast<T>(v.x);
@ -207,7 +207,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator&=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator&=(U scalar)
{ {
this->x &= static_cast<T>(scalar); this->x &= static_cast<T>(scalar);
@ -215,7 +215,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator&=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator&=(vec<1, U, Q> const& v)
{ {
this->x &= static_cast<T>(v.x); this->x &= static_cast<T>(v.x);
@ -223,7 +223,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator|=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator|=(U scalar)
{ {
this->x |= static_cast<T>(scalar); this->x |= static_cast<T>(scalar);
@ -231,7 +231,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator|=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator|=(vec<1, U, Q> const& v)
{ {
this->x |= U(v.x); this->x |= U(v.x);
@ -239,7 +239,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator^=(U scalar)
{ {
this->x ^= static_cast<T>(scalar); this->x ^= static_cast<T>(scalar);
@ -247,7 +247,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator^=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator^=(vec<1, U, Q> const& v)
{ {
this->x ^= static_cast<T>(v.x); this->x ^= static_cast<T>(v.x);
@ -255,7 +255,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator<<=(U scalar)
{ {
this->x <<= static_cast<T>(scalar); this->x <<= static_cast<T>(scalar);
@ -263,7 +263,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator<<=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator<<=(vec<1, U, Q> const& v)
{ {
this->x <<= static_cast<T>(v.x); this->x <<= static_cast<T>(v.x);
@ -271,7 +271,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator>>=(U scalar)
{ {
this->x >>= static_cast<T>(scalar); this->x >>= static_cast<T>(scalar);
@ -279,7 +279,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator>>=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> & vec<1, T, Q>::operator>>=(vec<1, U, Q> const& v)
{ {
this->x >>= static_cast<T>(v.x); this->x >>= static_cast<T>(v.x);
@ -303,14 +303,14 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> operator+(vec<1, T, Q> const& v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> operator+(vec<1, T, Q> const& v, T scalar)
{ {
return vec<1, T, Q>( return vec<1, T, Q>(
v.x + scalar); v.x + scalar);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> operator+(T scalar, vec<1, T, Q> const& v) GLM_FUNC_QUALIFIER vec<1, T, Q> operator+(T scalar, vec<1, T, Q> const& v)
{ {
return vec<1, T, Q>( return vec<1, T, Q>(
@ -325,7 +325,7 @@ namespace glm
} }
//operator- //operator-
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> operator-(vec<1, T, Q> const& v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> operator-(vec<1, T, Q> const& v, T scalar)
{ {
return vec<1, T, Q>( return vec<1, T, Q>(
@ -452,7 +452,7 @@ namespace glm
return vec<1, T, Q>( return vec<1, T, Q>(
v1.x | v2.x); v1.x | v2.x);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<1, T, Q> operator^(vec<1, T, Q> const& v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, Q> operator^(vec<1, T, Q> const& v, T scalar)
{ {
@ -525,13 +525,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2) GLM_FUNC_QUALIFIER bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
{ {
return detail::compute_equal<T>::call(v1.x, v2.x); return detail::compute_equal<T>::call(v1.x, v2.x);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2) GLM_FUNC_QUALIFIER bool operator!=(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
{ {
return !(v1 == v2); return !(v1 == v2);

View File

@ -39,7 +39,7 @@ namespace glm
# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
# pragma clang diagnostic ignored "-Wnested-anon-types" # pragma clang diagnostic ignored "-Wnested-anon-types"
# endif # endif
union union
{ {
struct{ T x, y; }; struct{ T x, y; };
@ -59,7 +59,7 @@ namespace glm
# endif//GLM_SWIZZLE # endif//GLM_SWIZZLE
}; };
# if GLM_COMPILER & GLM_COMPILER_CLANG # if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop # pragma clang diagnostic pop
# endif # endif
@ -166,41 +166,41 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator%=(U scalar); GLM_FUNC_DECL vec & operator%=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator%=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator%=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator%=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator%=(vec<2, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator&=(U scalar); GLM_FUNC_DECL vec & operator&=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator&=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator&=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator&=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator&=(vec<2, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator|=(U scalar); GLM_FUNC_DECL vec & operator|=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator|=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator|=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator|=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator|=(vec<2, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator^=(U scalar); GLM_FUNC_DECL vec & operator^=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator^=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator^=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator^=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator^=(vec<2, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator<<=(U scalar); GLM_FUNC_DECL vec & operator<<=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator<<=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator<<=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator<<=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator<<=(vec<2, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator>>=(U scalar); GLM_FUNC_DECL vec & operator>>=(U scalar);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator>>=(vec<1, U, Q> const& v); GLM_FUNC_DECL vec & operator>>=(vec<1, U, Q> const& v);
template<typename U> template<typename U>
GLM_FUNC_DECL vec & operator>>=(vec<2, U, Q> const& v); GLM_FUNC_DECL vec & operator>>=(vec<2, U, Q> const& v);
}; };

View File

@ -238,7 +238,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, T, Q> vec<2, T, Q>::operator++(int) GLM_FUNC_QUALIFIER vec<2, T, Q> vec<2, T, Q>::operator++(int)
{ {
vec<2, T, Q> Result(*this); vec<2, T, Q> Result(*this);
@ -246,7 +246,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, T, Q> vec<2, T, Q>::operator--(int) GLM_FUNC_QUALIFIER vec<2, T, Q> vec<2, T, Q>::operator--(int)
{ {
vec<2, T, Q> Result(*this); vec<2, T, Q> Result(*this);
@ -430,7 +430,7 @@ namespace glm
GLM_FUNC_QUALIFIER vec<2, T, Q> operator-(vec<2, T, Q> const& v) GLM_FUNC_QUALIFIER vec<2, T, Q> operator-(vec<2, T, Q> const& v)
{ {
return vec<2, T, Q>( return vec<2, T, Q>(
-v.x, -v.x,
-v.y); -v.y);
} }

View File

@ -58,7 +58,7 @@ namespace glm
GLM_SWIZZLE3_4_MEMBERS(T, Q, s, t, p) GLM_SWIZZLE3_4_MEMBERS(T, Q, s, t, p)
# endif//GLM_SWIZZLE # endif//GLM_SWIZZLE
}; };
# if GLM_COMPILER & GLM_COMPILER_CLANG # if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop # pragma clang diagnostic pop
# endif # endif
@ -385,7 +385,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2); GLM_FUNC_DECL vec<3, T, Q> operator>>(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2);
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> operator~(vec<3, T, Q> const& v); GLM_FUNC_DECL vec<3, T, Q> operator~(vec<3, T, Q> const& v);
// -- Boolean operators -- // -- Boolean operators --

View File

@ -283,7 +283,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> vec<3, T, Q>::operator++(int) GLM_FUNC_QUALIFIER vec<3, T, Q> vec<3, T, Q>::operator++(int)
{ {
vec<3, T, Q> Result(*this); vec<3, T, Q> Result(*this);
@ -291,7 +291,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> vec<3, T, Q>::operator--(int) GLM_FUNC_QUALIFIER vec<3, T, Q> vec<3, T, Q>::operator--(int)
{ {
vec<3, T, Q> Result(*this); vec<3, T, Q> Result(*this);
@ -372,7 +372,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<1, U, Q> const& v)
{ {
this->x |= v.x; this->x |= v.x;
@ -382,7 +382,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator|=(vec<3, U, Q> const& v)
{ {
this->x |= v.x; this->x |= v.x;
@ -392,7 +392,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(U scalar)
{ {
this->x ^= scalar; this->x ^= scalar;
@ -402,7 +402,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<1, U, Q> const& v)
{ {
this->x ^= v.x; this->x ^= v.x;
@ -412,7 +412,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator^=(vec<3, U, Q> const& v)
{ {
this->x ^= v.x; this->x ^= v.x;
@ -422,7 +422,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(U scalar)
{ {
this->x <<= scalar; this->x <<= scalar;
@ -432,7 +432,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<1, U, Q> const& v)
{ {
this->x <<= static_cast<T>(v.x); this->x <<= static_cast<T>(v.x);
@ -442,7 +442,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator<<=(vec<3, U, Q> const& v)
{ {
this->x <<= static_cast<T>(v.x); this->x <<= static_cast<T>(v.x);
@ -452,7 +452,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(U scalar)
{ {
this->x >>= static_cast<T>(scalar); this->x >>= static_cast<T>(scalar);
@ -462,7 +462,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<1, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<1, U, Q> const& v)
{ {
this->x >>= static_cast<T>(v.x); this->x >>= static_cast<T>(v.x);
@ -472,7 +472,7 @@ namespace glm
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> & vec<3, T, Q>::operator>>=(vec<3, U, Q> const& v)
{ {
this->x >>= static_cast<T>(v.x); this->x >>= static_cast<T>(v.x);
@ -493,8 +493,8 @@ namespace glm
GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(vec<3, T, Q> const& v)
{ {
return vec<3, T, Q>( return vec<3, T, Q>(
-v.x, -v.x,
-v.y, -v.y,
-v.z); -v.z);
} }
@ -563,7 +563,7 @@ namespace glm
v.z - scalar.x); v.z - scalar.x);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(T scalar, vec<3, T, Q> const& v)
{ {
return vec<3, T, Q>( return vec<3, T, Q>(
@ -572,7 +572,7 @@ namespace glm
scalar - v.z); scalar - v.z);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> operator-(vec<1, T, Q> const& scalar, vec<3, T, Q> const& v)
{ {
return vec<3, T, Q>( return vec<3, T, Q>(
@ -952,7 +952,7 @@ namespace glm
v1.z >> v2.z); v1.z >> v2.z);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> operator~(vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER vec<3, T, Q> operator~(vec<3, T, Q> const& v)
{ {
return vec<3, T, Q>( return vec<3, T, Q>(

View File

@ -9,7 +9,7 @@ namespace detail
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
template<qualifier Q, int E0, int E1, int E2, int E3> template<qualifier Q, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, float, Q, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4> struct _swizzle_base1<4, float, Q, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, float, Q> operator ()() const GLM_FUNC_QUALIFIER vec<4, float, Q> operator ()() const
{ {
__m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer); __m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer);
@ -26,7 +26,7 @@ namespace detail
template<qualifier Q, int E0, int E1, int E2, int E3> template<qualifier Q, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, int32, Q, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4> struct _swizzle_base1<4, int32, Q, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, int32, Q> operator ()() const GLM_FUNC_QUALIFIER vec<4, int32, Q> operator ()() const
{ {
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);
@ -39,7 +39,7 @@ namespace detail
template<qualifier Q, int E0, int E1, int E2, int E3> template<qualifier Q, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, uint32, Q, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4> struct _swizzle_base1<4, uint32, Q, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, uint32, Q> operator ()() const GLM_FUNC_QUALIFIER vec<4, uint32, Q> operator ()() const
{ {
__m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer);

View File

@ -1,11 +1,11 @@
/// @ref core /// @ref core
/// @file glm/exponential.hpp /// @file glm/exponential.hpp
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
/// ///
/// @defgroup core_func_exponential Exponential functions /// @defgroup core_func_exponential Exponential functions
/// @ingroup core /// @ingroup core
/// ///
/// Include <glm/exponential.hpp> to use these core features. /// Include <glm/exponential.hpp> to use these core features.
/// ///
/// These all operate component-wise. The description is per component. /// These all operate component-wise. The description is per component.
@ -23,7 +23,7 @@ namespace glm
/// @addtogroup core_func_exponential /// @addtogroup core_func_exponential
/// @{ /// @{
/// Returns 'base' raised to the power 'exponent'. /// Returns 'base' raised to the power 'exponent'.
/// ///
/// @param base Floating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type qualifier. /// @param base Floating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type qualifier.
/// @param exponent Floating point value representing the 'exponent'. /// @param exponent Floating point value representing the 'exponent'.
@ -38,39 +38,39 @@ namespace glm
/// @param v exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier. /// @param v exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml">GLSL exp man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> exp(vec<L, T, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> exp(vec<L, T, Q> const& v);
/// Returns the natural logarithm of v, i.e., /// Returns the natural logarithm of v, i.e.,
/// returns the value y which satisfies the equation x = e^y. /// returns the value y which satisfies the equation x = e^y.
/// Results are undefined if v <= 0. /// Results are undefined if v <= 0.
/// ///
/// @param v log function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier. /// @param v log function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml">GLSL log man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> log(vec<L, T, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> log(vec<L, T, Q> const& v);
/// Returns 2 raised to the v power. /// Returns 2 raised to the v power.
/// ///
/// @param v exp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier. /// @param v exp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml">GLSL exp2 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> exp2(vec<L, T, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> exp2(vec<L, T, Q> const& v);
/// Returns the base 2 log of x, i.e., returns the value y, /// Returns the base 2 log of x, i.e., returns the value y,
/// which satisfies the equation x = 2 ^ y. /// which satisfies the equation x = 2 ^ y.
/// ///
/// @param v log2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier. /// @param v log2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
@ -81,22 +81,22 @@ namespace glm
GLM_FUNC_DECL vec<L, T, Q> log2(vec<L, T, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> log2(vec<L, T, Q> const& v);
/// Returns the positive square root of v. /// Returns the positive square root of v.
/// ///
/// @param v sqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier. /// @param v sqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml">GLSL sqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> sqrt(vec<L, T, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> sqrt(vec<L, T, Q> const& v);
/// Returns the reciprocal of the positive square root of v. /// Returns the reciprocal of the positive square root of v.
/// ///
/// @param v inversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier. /// @param v inversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml">GLSL inversesqrt man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -7,7 +7,7 @@
/// @ingroup ext /// @ingroup ext
/// ///
/// Include <glm/ext/vec1.hpp> to use the features of this extension. /// Include <glm/ext/vec1.hpp> to use the features of this extension.
/// ///
/// Add vec1, ivec1, uvec1 and bvec1 types. /// Add vec1, ivec1, uvec1 and bvec1 types.
#pragma once #pragma once
@ -56,7 +56,7 @@ namespace glm
# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
# pragma clang diagnostic ignored "-Wnested-anon-types" # pragma clang diagnostic ignored "-Wnested-anon-types"
# endif # endif
union union
{ {
T x; T x;
@ -75,7 +75,7 @@ namespace glm
_GLM_SWIZZLE1_4_MEMBERS(T, Q, tvec4, s) _GLM_SWIZZLE1_4_MEMBERS(T, Q, tvec4, s)
# endif//GLM_SWIZZLE*/ # endif//GLM_SWIZZLE*/
}; };
# if GLM_COMPILER & GLM_COMPILER_CLANG # if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop # pragma clang diagnostic pop
# endif # endif

View File

@ -1,13 +1,13 @@
/// @ref ext_vector_relational /// @ref ext_vector_relational
/// @file glm/ext/vector_relational.hpp /// @file glm/ext/vector_relational.hpp
/// ///
/// @see core (dependence) /// @see core (dependence)
/// ///
/// @defgroup ext_vector_relational GLM_EXT_vector_relational /// @defgroup ext_vector_relational GLM_EXT_vector_relational
/// @ingroup ext /// @ingroup ext
/// ///
/// Include <glm/ext/vector_relational.hpp> to use the features of this extension. /// Include <glm/ext/vector_relational.hpp> to use the features of this extension.
/// ///
/// Comparison functions for a user defined epsilon values. /// Comparison functions for a user defined epsilon values.
#pragma once #pragma once

View File

@ -67,17 +67,17 @@ namespace glm
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
typedef tquat<double, lowp> lowp_dquat; typedef tquat<double, lowp> lowp_dquat;
/// Quaternion of medium double-qualifier floating-point numbers. /// Quaternion of medium double-qualifier floating-point numbers.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
typedef tquat<double, mediump> mediump_dquat; typedef tquat<double, mediump> mediump_dquat;
/// Quaternion of high double-qualifier floating-point numbers. /// Quaternion of high double-qualifier floating-point numbers.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
typedef tquat<double, highp> highp_dquat; typedef tquat<double, highp> highp_dquat;
#if(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) #if(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
typedef highp_dquat dquat; typedef highp_dquat dquat;
#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
@ -100,7 +100,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_int8; typedef detail::int8 lowp_int8;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_int16; typedef detail::int16 lowp_int16;
@ -116,7 +116,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_int8_t; typedef detail::int8 lowp_int8_t;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_int16_t; typedef detail::int16 lowp_int16_t;
@ -132,7 +132,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_i8; typedef detail::int8 lowp_i8;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_i16; typedef detail::int16 lowp_i16;
@ -148,7 +148,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_int8; typedef detail::int8 mediump_int8;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_int16; typedef detail::int16 mediump_int16;
@ -164,7 +164,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_int8_t; typedef detail::int8 mediump_int8_t;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_int16_t; typedef detail::int16 mediump_int16_t;
@ -180,7 +180,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_i8; typedef detail::int8 mediump_i8;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_i16; typedef detail::int16 mediump_i16;
@ -196,7 +196,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_int8; typedef detail::int8 highp_int8;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_int16; typedef detail::int16 highp_int16;
@ -212,7 +212,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_int8_t; typedef detail::int8 highp_int8_t;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_int16_t; typedef detail::int16 highp_int16_t;
@ -228,7 +228,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_i8; typedef detail::int8 highp_i8;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_i16; typedef detail::int16 highp_i16;
@ -240,12 +240,12 @@ namespace glm
/// High qualifier 64 bit signed integer type. /// High qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 highp_i64; typedef detail::int64 highp_i64;
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 int8; typedef detail::int8 int8;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 int16; typedef detail::int16 int16;
@ -268,7 +268,7 @@ namespace glm
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 int8_t; typedef detail::int8 int8_t;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 int16_t; typedef detail::int16 int16_t;
@ -285,7 +285,7 @@ namespace glm
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 i8; typedef detail::int8 i8;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 i16; typedef detail::int16 i16;
@ -297,59 +297,59 @@ namespace glm
/// 64 bit signed integer type. /// 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 i64; typedef detail::int64 i64;
/// Low qualifier 8 bit signed integer scalar type. /// Low qualifier 8 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i8, lowp> lowp_i8vec1; typedef vec<1, i8, lowp> lowp_i8vec1;
/// Low qualifier 8 bit signed integer vector of 2 components type. /// Low qualifier 8 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i8, lowp> lowp_i8vec2; typedef vec<2, i8, lowp> lowp_i8vec2;
/// Low qualifier 8 bit signed integer vector of 3 components type. /// Low qualifier 8 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i8, lowp> lowp_i8vec3; typedef vec<3, i8, lowp> lowp_i8vec3;
/// Low qualifier 8 bit signed integer vector of 4 components type. /// Low qualifier 8 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i8, lowp> lowp_i8vec4; typedef vec<4, i8, lowp> lowp_i8vec4;
/// Medium qualifier 8 bit signed integer scalar type. /// Medium qualifier 8 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i8, mediump> mediump_i8vec1; typedef vec<1, i8, mediump> mediump_i8vec1;
/// Medium qualifier 8 bit signed integer vector of 2 components type. /// Medium qualifier 8 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i8, mediump> mediump_i8vec2; typedef vec<2, i8, mediump> mediump_i8vec2;
/// Medium qualifier 8 bit signed integer vector of 3 components type. /// Medium qualifier 8 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i8, mediump> mediump_i8vec3; typedef vec<3, i8, mediump> mediump_i8vec3;
/// Medium qualifier 8 bit signed integer vector of 4 components type. /// Medium qualifier 8 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i8, mediump> mediump_i8vec4; typedef vec<4, i8, mediump> mediump_i8vec4;
/// High qualifier 8 bit signed integer scalar type. /// High qualifier 8 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i8, highp> highp_i8vec1; typedef vec<1, i8, highp> highp_i8vec1;
/// High qualifier 8 bit signed integer vector of 2 components type. /// High qualifier 8 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i8, highp> highp_i8vec2; typedef vec<2, i8, highp> highp_i8vec2;
/// High qualifier 8 bit signed integer vector of 3 components type. /// High qualifier 8 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i8, highp> highp_i8vec3; typedef vec<3, i8, highp> highp_i8vec3;
/// High qualifier 8 bit signed integer vector of 4 components type. /// High qualifier 8 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i8, highp> highp_i8vec4; typedef vec<4, i8, highp> highp_i8vec4;
#if(defined(GLM_PRECISION_LOWP_INT)) #if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_i8vec1 i8vec1; typedef lowp_i8vec1 i8vec1;
typedef lowp_i8vec2 i8vec2; typedef lowp_i8vec2 i8vec2;
@ -359,77 +359,77 @@ namespace glm
typedef mediump_i8vec1 i8vec1; typedef mediump_i8vec1 i8vec1;
typedef mediump_i8vec2 i8vec2; typedef mediump_i8vec2 i8vec2;
typedef mediump_i8vec3 i8vec3; typedef mediump_i8vec3 i8vec3;
typedef mediump_i8vec4 i8vec4; typedef mediump_i8vec4 i8vec4;
#else #else
/// Default qualifier 8 bit signed integer scalar type. /// Default qualifier 8 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i8vec1 i8vec1; typedef highp_i8vec1 i8vec1;
/// Default qualifier 8 bit signed integer vector of 2 components type. /// Default qualifier 8 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i8vec2 i8vec2; typedef highp_i8vec2 i8vec2;
/// Default qualifier 8 bit signed integer vector of 3 components type. /// Default qualifier 8 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i8vec3 i8vec3; typedef highp_i8vec3 i8vec3;
/// Default qualifier 8 bit signed integer vector of 4 components type. /// Default qualifier 8 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i8vec4 i8vec4; typedef highp_i8vec4 i8vec4;
#endif #endif
/// Low qualifier 16 bit signed integer scalar type. /// Low qualifier 16 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i16, lowp> lowp_i16vec1; typedef vec<1, i16, lowp> lowp_i16vec1;
/// Low qualifier 16 bit signed integer vector of 2 components type. /// Low qualifier 16 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i16, lowp> lowp_i16vec2; typedef vec<2, i16, lowp> lowp_i16vec2;
/// Low qualifier 16 bit signed integer vector of 3 components type. /// Low qualifier 16 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i16, lowp> lowp_i16vec3; typedef vec<3, i16, lowp> lowp_i16vec3;
/// Low qualifier 16 bit signed integer vector of 4 components type. /// Low qualifier 16 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i16, lowp> lowp_i16vec4; typedef vec<4, i16, lowp> lowp_i16vec4;
/// Medium qualifier 16 bit signed integer scalar type. /// Medium qualifier 16 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i16, mediump> mediump_i16vec1; typedef vec<1, i16, mediump> mediump_i16vec1;
/// Medium qualifier 16 bit signed integer vector of 2 components type. /// Medium qualifier 16 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i16, mediump> mediump_i16vec2; typedef vec<2, i16, mediump> mediump_i16vec2;
/// Medium qualifier 16 bit signed integer vector of 3 components type. /// Medium qualifier 16 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i16, mediump> mediump_i16vec3; typedef vec<3, i16, mediump> mediump_i16vec3;
/// Medium qualifier 16 bit signed integer vector of 4 components type. /// Medium qualifier 16 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i16, mediump> mediump_i16vec4; typedef vec<4, i16, mediump> mediump_i16vec4;
/// High qualifier 16 bit signed integer scalar type. /// High qualifier 16 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i16, highp> highp_i16vec1; typedef vec<1, i16, highp> highp_i16vec1;
/// High qualifier 16 bit signed integer vector of 2 components type. /// High qualifier 16 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i16, highp> highp_i16vec2; typedef vec<2, i16, highp> highp_i16vec2;
/// High qualifier 16 bit signed integer vector of 3 components type. /// High qualifier 16 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i16, highp> highp_i16vec3; typedef vec<3, i16, highp> highp_i16vec3;
/// High qualifier 16 bit signed integer vector of 4 components type. /// High qualifier 16 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i16, highp> highp_i16vec4; typedef vec<4, i16, highp> highp_i16vec4;
#if(defined(GLM_PRECISION_LOWP_INT)) #if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_i16vec1 i16vec1; typedef lowp_i16vec1 i16vec1;
typedef lowp_i16vec2 i16vec2; typedef lowp_i16vec2 i16vec2;
@ -444,15 +444,15 @@ namespace glm
/// Default qualifier 16 bit signed integer scalar type. /// Default qualifier 16 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i16vec1 i16vec1; typedef highp_i16vec1 i16vec1;
/// Default qualifier 16 bit signed integer vector of 2 components type. /// Default qualifier 16 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i16vec2 i16vec2; typedef highp_i16vec2 i16vec2;
/// Default qualifier 16 bit signed integer vector of 3 components type. /// Default qualifier 16 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i16vec3 i16vec3; typedef highp_i16vec3 i16vec3;
/// Default qualifier 16 bit signed integer vector of 4 components type. /// Default qualifier 16 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i16vec4 i16vec4; typedef highp_i16vec4 i16vec4;
@ -462,53 +462,53 @@ namespace glm
/// Low qualifier 32 bit signed integer scalar type. /// Low qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, lowp> lowp_i32vec1; typedef vec<1, i32, lowp> lowp_i32vec1;
/// Low qualifier 32 bit signed integer vector of 2 components type. /// Low qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, lowp> lowp_i32vec2; typedef vec<2, i32, lowp> lowp_i32vec2;
/// Low qualifier 32 bit signed integer vector of 3 components type. /// Low qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, lowp> lowp_i32vec3; typedef vec<3, i32, lowp> lowp_i32vec3;
/// Low qualifier 32 bit signed integer vector of 4 components type. /// Low qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, lowp> lowp_i32vec4; typedef vec<4, i32, lowp> lowp_i32vec4;
/// Medium qualifier 32 bit signed integer scalar type. /// Medium qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, mediump> mediump_i32vec1; typedef vec<1, i32, mediump> mediump_i32vec1;
/// Medium qualifier 32 bit signed integer vector of 2 components type. /// Medium qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, mediump> mediump_i32vec2; typedef vec<2, i32, mediump> mediump_i32vec2;
/// Medium qualifier 32 bit signed integer vector of 3 components type. /// Medium qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, mediump> mediump_i32vec3; typedef vec<3, i32, mediump> mediump_i32vec3;
/// Medium qualifier 32 bit signed integer vector of 4 components type. /// Medium qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, mediump> mediump_i32vec4; typedef vec<4, i32, mediump> mediump_i32vec4;
/// High qualifier 32 bit signed integer scalar type. /// High qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, highp> highp_i32vec1; typedef vec<1, i32, highp> highp_i32vec1;
/// High qualifier 32 bit signed integer vector of 2 components type. /// High qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, highp> highp_i32vec2; typedef vec<2, i32, highp> highp_i32vec2;
/// High qualifier 32 bit signed integer vector of 3 components type. /// High qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, highp> highp_i32vec3; typedef vec<3, i32, highp> highp_i32vec3;
/// High qualifier 32 bit signed integer vector of 4 components type. /// High qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, highp> highp_i32vec4; typedef vec<4, i32, highp> highp_i32vec4;
#if(defined(GLM_PRECISION_LOWP_INT)) #if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_i32vec1 i32vec1; typedef lowp_i32vec1 i32vec1;
typedef lowp_i32vec2 i32vec2; typedef lowp_i32vec2 i32vec2;
@ -523,15 +523,15 @@ namespace glm
/// Default qualifier 32 bit signed integer scalar type. /// Default qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec1 i32vec1; typedef highp_i32vec1 i32vec1;
/// Default qualifier 32 bit signed integer vector of 2 components type. /// Default qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec2 i32vec2; typedef highp_i32vec2 i32vec2;
/// Default qualifier 32 bit signed integer vector of 3 components type. /// Default qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec3 i32vec3; typedef highp_i32vec3 i32vec3;
/// Default qualifier 32 bit signed integer vector of 4 components type. /// Default qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec4 i32vec4; typedef highp_i32vec4 i32vec4;
@ -541,53 +541,53 @@ namespace glm
/// Low qualifier 32 bit signed integer scalar type. /// Low qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, lowp> lowp_i32vec1; typedef vec<1, i32, lowp> lowp_i32vec1;
/// Low qualifier 32 bit signed integer vector of 2 components type. /// Low qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, lowp> lowp_i32vec2; typedef vec<2, i32, lowp> lowp_i32vec2;
/// Low qualifier 32 bit signed integer vector of 3 components type. /// Low qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, lowp> lowp_i32vec3; typedef vec<3, i32, lowp> lowp_i32vec3;
/// Low qualifier 32 bit signed integer vector of 4 components type. /// Low qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, lowp> lowp_i32vec4; typedef vec<4, i32, lowp> lowp_i32vec4;
/// Medium qualifier 32 bit signed integer scalar type. /// Medium qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, mediump> mediump_i32vec1; typedef vec<1, i32, mediump> mediump_i32vec1;
/// Medium qualifier 32 bit signed integer vector of 2 components type. /// Medium qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, mediump> mediump_i32vec2; typedef vec<2, i32, mediump> mediump_i32vec2;
/// Medium qualifier 32 bit signed integer vector of 3 components type. /// Medium qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, mediump> mediump_i32vec3; typedef vec<3, i32, mediump> mediump_i32vec3;
/// Medium qualifier 32 bit signed integer vector of 4 components type. /// Medium qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, mediump> mediump_i32vec4; typedef vec<4, i32, mediump> mediump_i32vec4;
/// High qualifier 32 bit signed integer scalar type. /// High qualifier 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, highp> highp_i32vec1; typedef vec<1, i32, highp> highp_i32vec1;
/// High qualifier 32 bit signed integer vector of 2 components type. /// High qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, highp> highp_i32vec2; typedef vec<2, i32, highp> highp_i32vec2;
/// High qualifier 32 bit signed integer vector of 3 components type. /// High qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i32, highp> highp_i32vec3; typedef vec<3, i32, highp> highp_i32vec3;
/// High qualifier 32 bit signed integer vector of 4 components type. /// High qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i32, highp> highp_i32vec4; typedef vec<4, i32, highp> highp_i32vec4;
#if(defined(GLM_PRECISION_LOWP_INT)) #if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_i32vec1 i32vec1; typedef lowp_i32vec1 i32vec1;
typedef lowp_i32vec2 i32vec2; typedef lowp_i32vec2 i32vec2;
@ -606,68 +606,68 @@ namespace glm
/// Default qualifier 32 bit signed integer vector of 2 components type. /// Default qualifier 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec2 i32vec2; typedef highp_i32vec2 i32vec2;
/// Default qualifier 32 bit signed integer vector of 3 components type. /// Default qualifier 32 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec3 i32vec3; typedef highp_i32vec3 i32vec3;
/// Default qualifier 32 bit signed integer vector of 4 components type. /// Default qualifier 32 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i32vec4 i32vec4; typedef highp_i32vec4 i32vec4;
#endif #endif
/// Low qualifier 64 bit signed integer scalar type. /// Low qualifier 64 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i64, lowp> lowp_i64vec1; typedef vec<1, i64, lowp> lowp_i64vec1;
/// Low qualifier 64 bit signed integer vector of 2 components type. /// Low qualifier 64 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i64, lowp> lowp_i64vec2; typedef vec<2, i64, lowp> lowp_i64vec2;
/// Low qualifier 64 bit signed integer vector of 3 components type. /// Low qualifier 64 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i64, lowp> lowp_i64vec3; typedef vec<3, i64, lowp> lowp_i64vec3;
/// Low qualifier 64 bit signed integer vector of 4 components type. /// Low qualifier 64 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i64, lowp> lowp_i64vec4; typedef vec<4, i64, lowp> lowp_i64vec4;
/// Medium qualifier 64 bit signed integer scalar type. /// Medium qualifier 64 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i64, mediump> mediump_i64vec1; typedef vec<1, i64, mediump> mediump_i64vec1;
/// Medium qualifier 64 bit signed integer vector of 2 components type. /// Medium qualifier 64 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i64, mediump> mediump_i64vec2; typedef vec<2, i64, mediump> mediump_i64vec2;
/// Medium qualifier 64 bit signed integer vector of 3 components type. /// Medium qualifier 64 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i64, mediump> mediump_i64vec3; typedef vec<3, i64, mediump> mediump_i64vec3;
/// Medium qualifier 64 bit signed integer vector of 4 components type. /// Medium qualifier 64 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i64, mediump> mediump_i64vec4; typedef vec<4, i64, mediump> mediump_i64vec4;
/// High qualifier 64 bit signed integer scalar type. /// High qualifier 64 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i64, highp> highp_i64vec1; typedef vec<1, i64, highp> highp_i64vec1;
/// High qualifier 64 bit signed integer vector of 2 components type. /// High qualifier 64 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i64, highp> highp_i64vec2; typedef vec<2, i64, highp> highp_i64vec2;
/// High qualifier 64 bit signed integer vector of 3 components type. /// High qualifier 64 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, i64, highp> highp_i64vec3; typedef vec<3, i64, highp> highp_i64vec3;
/// High qualifier 64 bit signed integer vector of 4 components type. /// High qualifier 64 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, i64, highp> highp_i64vec4; typedef vec<4, i64, highp> highp_i64vec4;
#if(defined(GLM_PRECISION_LOWP_INT)) #if(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_i64vec1 i64vec1; typedef lowp_i64vec1 i64vec1;
typedef lowp_i64vec2 i64vec2; typedef lowp_i64vec2 i64vec2;
@ -686,188 +686,188 @@ namespace glm
/// Default qualifier 64 bit signed integer vector of 2 components type. /// Default qualifier 64 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i64vec2 i64vec2; typedef highp_i64vec2 i64vec2;
/// Default qualifier 64 bit signed integer vector of 3 components type. /// Default qualifier 64 bit signed integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i64vec3 i64vec3; typedef highp_i64vec3 i64vec3;
/// Default qualifier 64 bit signed integer vector of 4 components type. /// Default qualifier 64 bit signed integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_i64vec4 i64vec4; typedef highp_i64vec4 i64vec4;
#endif #endif
///////////////////////////// /////////////////////////////
// Unsigned int vector types // Unsigned int vector types
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_uint8; typedef detail::uint8 lowp_uint8;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_uint16; typedef detail::uint16 lowp_uint16;
/// Low qualifier 32 bit unsigned integer type. /// Low qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 lowp_uint32; typedef detail::uint32 lowp_uint32;
/// Low qualifier 64 bit unsigned integer type. /// Low qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 lowp_uint64; typedef detail::uint64 lowp_uint64;
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_uint8_t; typedef detail::uint8 lowp_uint8_t;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_uint16_t; typedef detail::uint16 lowp_uint16_t;
/// Low qualifier 32 bit unsigned integer type. /// Low qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 lowp_uint32_t; typedef detail::uint32 lowp_uint32_t;
/// Low qualifier 64 bit unsigned integer type. /// Low qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 lowp_uint64_t; typedef detail::uint64 lowp_uint64_t;
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_u8; typedef detail::uint8 lowp_u8;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_u16; typedef detail::uint16 lowp_u16;
/// Low qualifier 32 bit unsigned integer type. /// Low qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 lowp_u32; typedef detail::uint32 lowp_u32;
/// Low qualifier 64 bit unsigned integer type. /// Low qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 lowp_u64; typedef detail::uint64 lowp_u64;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_uint8; typedef detail::uint8 mediump_uint8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_uint16; typedef detail::uint16 mediump_uint16;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 mediump_uint32; typedef detail::uint32 mediump_uint32;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 mediump_uint64; typedef detail::uint64 mediump_uint64;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_uint8_t; typedef detail::uint8 mediump_uint8_t;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_uint16_t; typedef detail::uint16 mediump_uint16_t;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 mediump_uint32_t; typedef detail::uint32 mediump_uint32_t;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 mediump_uint64_t; typedef detail::uint64 mediump_uint64_t;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_u8; typedef detail::uint8 mediump_u8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_u16; typedef detail::uint16 mediump_u16;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 mediump_u32; typedef detail::uint32 mediump_u32;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 mediump_u64; typedef detail::uint64 mediump_u64;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_uint8; typedef detail::uint8 highp_uint8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_uint16; typedef detail::uint16 highp_uint16;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 highp_uint32; typedef detail::uint32 highp_uint32;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 highp_uint64; typedef detail::uint64 highp_uint64;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_uint8_t; typedef detail::uint8 highp_uint8_t;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_uint16_t; typedef detail::uint16 highp_uint16_t;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 highp_uint32_t; typedef detail::uint32 highp_uint32_t;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 highp_uint64_t; typedef detail::uint64 highp_uint64_t;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_u8; typedef detail::uint8 highp_u8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_u16; typedef detail::uint16 highp_u16;
/// Medium qualifier 32 bit unsigned integer type. /// Medium qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 highp_u32; typedef detail::uint32 highp_u32;
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 highp_u64; typedef detail::uint64 highp_u64;
/// 8 bit unsigned integer type. /// 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 uint8; typedef detail::uint8 uint8;
/// 16 bit unsigned integer type. /// 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 uint16; typedef detail::uint16 uint16;
/// 32 bit unsigned integer type. /// 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 uint32; typedef detail::uint32 uint32;
/// 64 bit unsigned integer type. /// 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 uint64; typedef detail::uint64 uint64;
#if GLM_HAS_EXTENDED_INTEGER_TYPE #if GLM_HAS_EXTENDED_INTEGER_TYPE
using std::uint8_t; using std::uint8_t;
using std::uint16_t; using std::uint16_t;
@ -877,15 +877,15 @@ namespace glm
/// 8 bit unsigned integer type. /// 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 uint8_t; typedef detail::uint8 uint8_t;
/// 16 bit unsigned integer type. /// 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 uint16_t; typedef detail::uint16 uint16_t;
/// 32 bit unsigned integer type. /// 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 uint32_t; typedef detail::uint32 uint32_t;
/// 64 bit unsigned integer type. /// 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 uint64_t; typedef detail::uint64 uint64_t;
@ -912,19 +912,19 @@ namespace glm
/// Low qualifier 8 bit unsigned integer scalar type. /// Low qualifier 8 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u8, lowp> lowp_u8vec1; typedef vec<1, u8, lowp> lowp_u8vec1;
/// Low qualifier 8 bit unsigned integer vector of 2 components type. /// Low qualifier 8 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, u8, lowp> lowp_u8vec2; typedef vec<2, u8, lowp> lowp_u8vec2;
/// Low qualifier 8 bit unsigned integer vector of 3 components type. /// Low qualifier 8 bit unsigned integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, u8, lowp> lowp_u8vec3; typedef vec<3, u8, lowp> lowp_u8vec3;
/// Low qualifier 8 bit unsigned integer vector of 4 components type. /// Low qualifier 8 bit unsigned integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, u8, lowp> lowp_u8vec4; typedef vec<4, u8, lowp> lowp_u8vec4;
/// Medium qualifier 8 bit unsigned integer scalar type. /// Medium qualifier 8 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
@ -968,7 +968,7 @@ namespace glm
typedef mediump_u8vec1 u8vec1; typedef mediump_u8vec1 u8vec1;
typedef mediump_u8vec2 u8vec2; typedef mediump_u8vec2 u8vec2;
typedef mediump_u8vec3 u8vec3; typedef mediump_u8vec3 u8vec3;
typedef mediump_u8vec4 u8vec4; typedef mediump_u8vec4 u8vec4;
#else #else
/// Default qualifier 8 bit unsigned integer scalar type. /// Default qualifier 8 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
@ -1215,18 +1215,18 @@ namespace glm
/// Default qualifier 32 bit unsigned integer vector of 2 components type. /// Default qualifier 32 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u32vec2 u32vec2; typedef highp_u32vec2 u32vec2;
/// Default qualifier 32 bit unsigned integer vector of 3 components type. /// Default qualifier 32 bit unsigned integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u32vec3 u32vec3; typedef highp_u32vec3 u32vec3;
/// Default qualifier 32 bit unsigned integer vector of 4 components type. /// Default qualifier 32 bit unsigned integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u32vec4 u32vec4; typedef highp_u32vec4 u32vec4;
#endif #endif
/// Low qualifier 64 bit unsigned integer scalar type. /// Low qualifier 64 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u64, lowp> lowp_u64vec1; typedef vec<1, u64, lowp> lowp_u64vec1;
@ -1295,17 +1295,17 @@ namespace glm
/// Default qualifier 64 bit unsigned integer vector of 2 components type. /// Default qualifier 64 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u64vec2 u64vec2; typedef highp_u64vec2 u64vec2;
/// Default qualifier 64 bit unsigned integer vector of 3 components type. /// Default qualifier 64 bit unsigned integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u64vec3 u64vec3; typedef highp_u64vec3 u64vec3;
/// Default qualifier 64 bit unsigned integer vector of 4 components type. /// Default qualifier 64 bit unsigned integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_u64vec4 u64vec4; typedef highp_u64vec4 u64vec4;
#endif #endif
////////////////////// //////////////////////
// Float vector types // Float vector types
@ -1369,7 +1369,7 @@ namespace glm
/// Low 32 bit single-qualifier floating-point scalar. /// Low 32 bit single-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float32 lowp_float32_t; typedef detail::float32 lowp_float32_t;
/// Low 64 bit double-qualifier floating-point scalar. /// Low 64 bit double-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float64 lowp_float64_t; typedef detail::float64 lowp_float64_t;
@ -1877,7 +1877,7 @@ namespace glm
/// High single-qualifier floating-point 3x3 matrix. /// High single-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_fmat3x3 highp_fmat3; typedef highp_fmat3x3 highp_fmat3;
/// High single-qualifier floating-point 4x4 matrix. /// High single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_fmat4x4 highp_fmat4; typedef highp_fmat4x4 highp_fmat4;
@ -2089,7 +2089,7 @@ namespace glm
/// Low double-qualifier floating-point 4x3 matrix. /// Low double-qualifier floating-point 4x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 3, f64, lowp> lowp_f64mat4x3; typedef mat<4, 3, f64, lowp> lowp_f64mat4x3;
/// Low double-qualifier floating-point 4x4 matrix. /// Low double-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f64, lowp> lowp_f64mat4x4; typedef mat<4, 4, f64, lowp> lowp_f64mat4x4;
@ -2375,7 +2375,7 @@ namespace glm
/// Default single-qualifier floating-point 4x4 matrix. /// Default single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_f32mat4x4 fmat4x4; typedef highp_f32mat4x4 fmat4x4;
/// Default single-qualifier floating-point 2x2 matrix. /// Default single-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef fmat2x2 fmat2; typedef fmat2x2 fmat2;
@ -2391,7 +2391,7 @@ namespace glm
/// Default single-qualifier floating-point quaternion. /// Default single-qualifier floating-point quaternion.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef highp_fquat fquat; typedef highp_fquat fquat;
/// Default single-qualifier floating-point vector of 1 components. /// Default single-qualifier floating-point vector of 1 components.

View File

@ -2,10 +2,10 @@
/// @file glm/geometric.hpp /// @file glm/geometric.hpp
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
/// ///
/// @defgroup core_func_geometric Geometric functions /// @defgroup core_func_geometric Geometric functions
/// @ingroup core /// @ingroup core
/// ///
/// Include <glm/geometric.hpp> to use these core features. /// Include <glm/geometric.hpp> to use these core features.
/// ///
/// These operate on vectors as vectors, not component-wise. /// These operate on vectors as vectors, not component-wise.
@ -20,10 +20,10 @@ namespace glm
/// @{ /// @{
/// Returns the length of x, i.e., sqrt(x * x). /// Returns the length of x, i.e., sqrt(x * x).
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -33,7 +33,7 @@ namespace glm
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml">GLSL distance man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -43,7 +43,7 @@ namespace glm
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml">GLSL dot man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -52,7 +52,7 @@ namespace glm
/// Returns the cross product of x and y. /// Returns the cross product of x and y.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml">GLSL cross man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -63,7 +63,7 @@ namespace glm
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml">GLSL normalize man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -73,7 +73,7 @@ namespace glm
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -82,12 +82,12 @@ namespace glm
vec<L, T, Q> const& I, vec<L, T, Q> const& I,
vec<L, T, Q> const& Nref); vec<L, T, Q> const& Nref);
/// For the incident vector I and surface orientation N, /// For the incident vector I and surface orientation N,
/// returns the reflection direction : result = I - 2.0 * dot(N, I) * N. /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml">GLSL reflect man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -95,13 +95,13 @@ namespace glm
vec<L, T, Q> const& I, vec<L, T, Q> const& I,
vec<L, T, Q> const& N); vec<L, T, Q> const& N);
/// For the incident vector I and surface normal N, /// For the incident vector I and surface normal N,
/// and the ratio of indices of refraction eta, /// and the ratio of indices of refraction eta,
/// return the refraction vector. /// return the refraction vector.
/// ///
/// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector. /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml">GLSL refract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -6,7 +6,7 @@
/// @brief Features that implement in C++ the GLSL specification as closely as possible. /// @brief Features that implement in C++ the GLSL specification as closely as possible.
/// ///
/// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and /// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and
/// C++ functions that mirror the GLSL functions. It also includes /// C++ functions that mirror the GLSL functions. It also includes
/// @ref core_precision "a set of qualifier-based types" that can be used in the appropriate /// @ref core_precision "a set of qualifier-based types" that can be used in the appropriate
/// functions. The C++ types are all based on a basic set of @ref core_template "template types". /// functions. The C++ types are all based on a basic set of @ref core_template "template types".
/// ///
@ -42,7 +42,7 @@
/// ///
/// @defgroup core_template Template types /// @defgroup core_template Template types
/// ///
/// @brief The generic template types used as the basis for the core types. /// @brief The generic template types used as the basis for the core types.
/// ///
/// These types are all templates used to define the actual @ref core_types. /// These types are all templates used to define the actual @ref core_types.
/// These templates are implementation details of GLM types and should not be used explicitly. /// These templates are implementation details of GLM types and should not be used explicitly.
@ -52,25 +52,25 @@
/// @defgroup gtc Stable extensions /// @defgroup gtc Stable extensions
/// ///
/// @brief Additional features not specified by GLSL specification. /// @brief Additional features not specified by GLSL specification.
/// ///
/// GTC extensions aim to be stable. /// GTC extensions aim to be stable.
/// ///
/// Even if it's highly unrecommended, it's possible to include all the extensions at once by /// Even if it's highly unrecommended, it's possible to include all the extensions at once by
/// including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file. /// including <glm/ext.hpp>. Otherwise, each extension needs to be included a specific file.
/// ///
/// @defgroup gtx Experimental extensions /// @defgroup gtx Experimental extensions
/// ///
/// @brief Experimental features not specified by GLSL specification. /// @brief Experimental features not specified by GLSL specification.
/// ///
/// Experimental extensions are useful functions and types, but the development of /// Experimental extensions are useful functions and types, but the development of
/// their API and functionality is not necessarily stable. They can change /// their API and functionality is not necessarily stable. They can change
/// substantially between versions. Backwards compatibility is not much of an issue /// substantially between versions. Backwards compatibility is not much of an issue
/// for them. /// for them.
/// ///
/// Even if it's highly unrecommended, it's possible to include all the extensions /// Even if it's highly unrecommended, it's possible to include all the extensions
/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be /// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be
/// included a specific file. /// included a specific file.
/// ///
/// @mainpage OpenGL Mathematics (GLM) /// @mainpage OpenGL Mathematics (GLM)
/// - Website: <a href="https://glm.g-truc.net">glm.g-truc.net</a> /// - Website: <a href="https://glm.g-truc.net">glm.g-truc.net</a>
/// - <a href="modules.html">GLM API documentation</a> /// - <a href="modules.html">GLM API documentation</a>

View File

@ -6,9 +6,9 @@
/// ///
/// @defgroup gtc_bitfield GLM_GTC_bitfield /// @defgroup gtc_bitfield GLM_GTC_bitfield
/// @ingroup gtc /// @ingroup gtc
/// ///
/// Include <glm/gtc/bitfield.hpp> to use the features of this extension. /// Include <glm/gtc/bitfield.hpp> to use the features of this extension.
/// ///
/// Allow to perform bit operations on integer values /// Allow to perform bit operations on integer values
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
@ -35,7 +35,7 @@ namespace glm
/// @see gtc_bitfield /// @see gtc_bitfield
template<typename genIUType> template<typename genIUType>
GLM_FUNC_DECL genIUType mask(genIUType Bits); GLM_FUNC_DECL genIUType mask(genIUType Bits);
/// Build a mask of 'count' bits /// Build a mask of 'count' bits
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
@ -113,112 +113,112 @@ namespace glm
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y); GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y); GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y); GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y); GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y); GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);
/// Interleaves the bits of x and y. /// Interleaves the bits of x and y.
/// The first bit is the first bit of x followed by the first bit of y. /// The first bit is the first bit of x followed by the first bit of y.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y); GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z); GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z); GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z); GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z); GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z); GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);
/// Interleaves the bits of x, y and z. /// Interleaves the bits of x, y and z.
/// The first bit is the first bit of x followed by the first bit of y and the first bit of z. /// The first bit is the first bit of x followed by the first bit of y and the first bit of z.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z); GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
/// Interleaves the bits of x, y, z and w. /// Interleaves the bits of x, y, z and w.
/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w); GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
/// Interleaves the bits of x, y, z and w. /// Interleaves the bits of x, y, z and w.
/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w); GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
/// Interleaves the bits of x, y, z and w. /// Interleaves the bits of x, y, z and w.
/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w); GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
/// Interleaves the bits of x, y, z and w. /// Interleaves the bits of x, y, z and w.
/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w. /// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.
/// The other bits are interleaved following the previous sequence. /// The other bits are interleaved following the previous sequence.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w); GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);

View File

@ -103,7 +103,7 @@ namespace detail
return REG1 | (REG2 << 1) | (REG3 << 2); return REG1 | (REG2 << 1) | (REG3 << 2);
} }
template<> template<>
GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z) GLM_FUNC_QUALIFIER glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z)
{ {

View File

@ -7,7 +7,7 @@
/// @ingroup gtc /// @ingroup gtc
/// ///
/// Include <glm/gtc/constants.hpp> to use the features of this extension. /// Include <glm/gtc/constants.hpp> to use the features of this extension.
/// ///
/// Provide a list of constants and precomputed useful values. /// Provide a list of constants and precomputed useful values.
#pragma once #pragma once

View File

@ -50,7 +50,7 @@ namespace glm
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType three_over_two_pi() GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType three_over_two_pi()
{ {
return genType(4.71238898038468985769396507491925432); return genType(4.71238898038468985769396507491925432);
} }
template<typename genType> template<typename genType>

View File

@ -1,6 +1,6 @@
/// @ref gtc_epsilon /// @ref gtc_epsilon
/// @file glm/gtc/epsilon.hpp /// @file glm/gtc/epsilon.hpp
/// ///
/// @see core (dependence) /// @see core (dependence)
/// @see gtc_quaternion (dependence) /// @see gtc_quaternion (dependence)
/// ///
@ -8,7 +8,7 @@
/// @ingroup gtc /// @ingroup gtc
/// ///
/// Include <glm/gtc/epsilon.hpp> to use the features of this extension. /// Include <glm/gtc/epsilon.hpp> to use the features of this extension.
/// ///
/// Comparison functions for a user defined epsilon values. /// Comparison functions for a user defined epsilon values.
#pragma once #pragma once

View File

@ -38,10 +38,10 @@ namespace glm
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
/// The fraction 0.5 will round in a direction chosen by the /// The fraction 0.5 will round in a direction chosen by the
/// implementation, presumably the direction that is fastest. /// implementation, presumably the direction that is fastest.
/// ///
/// @param x The values of the argument must be greater or equal to zero. /// @param x The values of the argument must be greater or equal to zero.
/// @tparam T floating point scalar types. /// @tparam T floating point scalar types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
/// @see gtc_integer /// @see gtc_integer
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
@ -50,10 +50,10 @@ namespace glm
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
/// The fraction 0.5 will round in a direction chosen by the /// The fraction 0.5 will round in a direction chosen by the
/// implementation, presumably the direction that is fastest. /// implementation, presumably the direction that is fastest.
/// ///
/// @param x The values of the argument must be greater or equal to zero. /// @param x The values of the argument must be greater or equal to zero.
/// @tparam T floating point scalar types. /// @tparam T floating point scalar types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/round.xml">GLSL round man page</a>
/// @see gtc_integer /// @see gtc_integer
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -134,7 +134,7 @@ namespace glm
/// Low-qualifier signed integer 2x2 matrix. /// Low-qualifier signed integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, int, lowp> lowp_imat2; typedef mat<2, 2, int, lowp> lowp_imat2;
/// Low-qualifier signed integer 3x3 matrix. /// Low-qualifier signed integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, int, lowp> lowp_imat3; typedef mat<3, 3, int, lowp> lowp_imat3;
@ -183,7 +183,7 @@ namespace glm
/// High-qualifier unsigned integer 2x2 matrix. /// High-qualifier unsigned integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, uint, highp> highp_umat2; typedef mat<2, 2, uint, highp> highp_umat2;
/// High-qualifier unsigned integer 3x3 matrix. /// High-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
@ -283,7 +283,7 @@ namespace glm
/// Low-qualifier unsigned integer 2x2 matrix. /// Low-qualifier unsigned integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, uint, lowp> lowp_umat2; typedef mat<2, 2, uint, lowp> lowp_umat2;
/// Low-qualifier unsigned integer 3x3 matrix. /// Low-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, uint, lowp> lowp_umat3; typedef mat<3, 3, uint, lowp> lowp_umat3;
@ -433,7 +433,7 @@ namespace glm
typedef lowp_umat4x3 umat4x3; typedef lowp_umat4x3 umat4x3;
typedef lowp_umat4x4 umat4x4; typedef lowp_umat4x4 umat4x4;
#else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) #else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
/// Unsigned integer 2x2 matrix. /// Unsigned integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mediump_umat2 umat2; typedef mediump_umat2 umat2;

View File

@ -29,15 +29,15 @@ namespace glm
/// @{ /// @{
/// Fast matrix inverse for affine matrix. /// Fast matrix inverse for affine matrix.
/// ///
/// @param m Input matrix to invert. /// @param m Input matrix to invert.
/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate. /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
/// @see gtc_matrix_inverse /// @see gtc_matrix_inverse
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType affineInverse(genType const& m); GLM_FUNC_DECL genType affineInverse(genType const& m);
/// Compute the inverse transpose of a matrix. /// Compute the inverse transpose of a matrix.
/// ///
/// @param m Input matrix to invert transpose. /// @param m Input matrix to invert transpose.
/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate. /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate.
/// @see gtc_matrix_inverse /// @see gtc_matrix_inverse

View File

@ -4,7 +4,7 @@
/// @see core (dependence) /// @see core (dependence)
/// @see gtx_transform /// @see gtx_transform
/// @see gtx_transform2 /// @see gtx_transform2
/// ///
/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform
/// @ingroup gtc /// @ingroup gtc
/// ///
@ -14,7 +14,7 @@
/// ///
/// The matrices generated by this extension use standard OpenGL fixed-function /// The matrices generated by this extension use standard OpenGL fixed-function
/// conventions. For example, the lookAt function generates a transform from world /// conventions. For example, the lookAt function generates a transform from world
/// space into the specific eye space that the projective matrix functions /// space into the specific eye space that the projective matrix functions
/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility
/// specifications defines the particular layout of this eye space. /// specifications defines the particular layout of this eye space.
@ -37,7 +37,7 @@ namespace glm
/// @{ /// @{
/// Builds a translation 4 * 4 matrix created from a vector of 3 components. /// Builds a translation 4 * 4 matrix created from a vector of 3 components.
/// ///
/// @param m Input matrix multiplied by this translation matrix. /// @param m Input matrix multiplied by this translation matrix.
/// @param v Coordinates of a translation vector. /// @param v Coordinates of a translation vector.
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
@ -54,34 +54,34 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - translate(mat<4, 4, T, Q> const& m, T x, T y, T z) /// @see - translate(mat<4, 4, T, Q> const& m, T x, T y, T z)
/// @see - translate(vec<3, T, Q> const& v) /// @see - translate(vec<3, T, Q> const& v)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml">glTranslate man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml">glTranslate man page</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> translate( GLM_FUNC_DECL mat<4, 4, T, Q> translate(
mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v); mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
/// ///
/// @param m Input matrix multiplied by this rotation matrix. /// @param m Input matrix multiplied by this rotation matrix.
/// @param angle Rotation angle expressed in radians. /// @param angle Rotation angle expressed in radians.
/// @param axis Rotation axis, recommended to be normalized. /// @param axis Rotation axis, recommended to be normalized.
/// @tparam T Value type used to build the matrix. Supported: half, float or double. /// @tparam T Value type used to build the matrix. Supported: half, float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z) /// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
/// @see - rotate(T angle, vec<3, T, Q> const& v) /// @see - rotate(T angle, vec<3, T, Q> const& v)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glRotate.xml">glRotate man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glRotate.xml">glRotate man page</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> rotate( GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis); mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
/// Builds a scale 4 * 4 matrix created from 3 scalars. /// Builds a scale 4 * 4 matrix created from 3 scalars.
/// ///
/// @param m Input matrix multiplied by this scale matrix. /// @param m Input matrix multiplied by this scale matrix.
/// @param v Ratio of scaling for each axis. /// @param v Ratio of scaling for each axis.
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - scale(mat<4, 4, T, Q> const& m, T x, T y, T z) /// @see - scale(mat<4, 4, T, Q> const& m, T x, T y, T z)
/// @see - scale(vec<3, T, Q> const& v) /// @see - scale(vec<3, T, Q> const& v)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glScale.xml">glScale man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glScale.xml">glScale man page</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> scale( GLM_FUNC_DECL mat<4, 4, T, Q> scale(
mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v); mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
@ -91,7 +91,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar) /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml">gluOrtho2D man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml">gluOrtho2D man page</a>
template<typename T> template<typename T>
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho( GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
T left, T right, T bottom, T top); T left, T right, T bottom, T top);
@ -184,7 +184,7 @@ namespace glm
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top) /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml">glOrtho man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml">glOrtho man page</a>
template<typename T> template<typename T>
GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho( GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
T left, T right, T bottom, T top, T zNear, T zFar); T left, T right, T bottom, T top, T zNear, T zFar);
@ -268,7 +268,7 @@ namespace glm
/// ///
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml">glFrustum man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml">glFrustum man page</a>
template<typename T> template<typename T>
GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum( GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
T left, T right, T bottom, T top, T near, T far); T left, T right, T bottom, T top, T near, T far);
@ -276,7 +276,7 @@ namespace glm
/// Creates a matrix for a right handed, symetric perspective-view frustum. /// Creates a matrix for a right handed, symetric perspective-view frustum.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -289,7 +289,7 @@ namespace glm
/// Creates a matrix for a right handed, symetric perspective-view frustum. /// Creates a matrix for a right handed, symetric perspective-view frustum.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -302,7 +302,7 @@ namespace glm
/// Creates a matrix for a left handed, symetric perspective-view frustum. /// Creates a matrix for a left handed, symetric perspective-view frustum.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -315,7 +315,7 @@ namespace glm
/// Creates a matrix for a left handed, symetric perspective-view frustum. /// Creates a matrix for a left handed, symetric perspective-view frustum.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -328,7 +328,7 @@ namespace glm
/// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise. /// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -341,7 +341,7 @@ namespace glm
/// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise. /// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -355,7 +355,7 @@ namespace glm
/// Creates a matrix for a right handed, symetric perspective-view frustum. /// Creates a matrix for a right handed, symetric perspective-view frustum.
/// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -369,7 +369,7 @@ namespace glm
/// Creates a matrix for a left handed, symetric perspective-view frustum. /// Creates a matrix for a left handed, symetric perspective-view frustum.
/// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -382,21 +382,21 @@ namespace glm
/// Creates a matrix for a symetric perspective-view frustum based on the default handedness and default near and far clip planes definition. /// Creates a matrix for a symetric perspective-view frustum based on the default handedness and default near and far clip planes definition.
/// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE. /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
/// ///
/// @param fovy Specifies the field of view angle in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
/// @param far Specifies the distance from the viewer to the far clipping plane (always positive). /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml">gluPerspective man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml">gluPerspective man page</a>
template<typename T> template<typename T>
GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective( GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
T fovy, T aspect, T near, T far); T fovy, T aspect, T near, T far);
/// Builds a perspective projection matrix based on a field of view using right-handed coordinates. /// Builds a perspective projection matrix based on a field of view using right-handed coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -410,7 +410,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view using right-handed coordinates. /// Builds a perspective projection matrix based on a field of view using right-handed coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -424,7 +424,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view using left-handed coordinates. /// Builds a perspective projection matrix based on a field of view using left-handed coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -438,7 +438,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view using left-handed coordinates. /// Builds a perspective projection matrix based on a field of view using left-handed coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -452,7 +452,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise. /// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -466,7 +466,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise. /// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -481,7 +481,7 @@ namespace glm
/// Builds a right handed perspective projection matrix based on a field of view. /// Builds a right handed perspective projection matrix based on a field of view.
/// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -496,7 +496,7 @@ namespace glm
/// Builds a left handed perspective projection matrix based on a field of view. /// Builds a left handed perspective projection matrix based on a field of view.
/// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -510,7 +510,7 @@ namespace glm
/// Builds a perspective projection matrix based on a field of view and the default handedness and default near and far clip planes definition. /// Builds a perspective projection matrix based on a field of view and the default handedness and default near and far clip planes definition.
/// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE. /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
/// ///
/// @param fov Expressed in radians. /// @param fov Expressed in radians.
/// @param width Width of the viewport /// @param width Width of the viewport
/// @param height Height of the viewport /// @param height Height of the viewport
@ -556,7 +556,7 @@ namespace glm
T fovy, T aspect, T near); T fovy, T aspect, T near);
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -567,7 +567,7 @@ namespace glm
T fovy, T aspect, T near); T fovy, T aspect, T near);
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
/// ///
/// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians. /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
/// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height). /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
/// @param near Specifies the distance from the viewer to the near clipping plane (always positive). /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
@ -580,7 +580,7 @@ namespace glm
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
/// ///
/// @param obj Specify the object coordinates. /// @param obj Specify the object coordinates.
/// @param model Specifies the current modelview matrix /// @param model Specifies the current modelview matrix
/// @param proj Specifies the current projection matrix /// @param proj Specifies the current projection matrix
@ -589,14 +589,14 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> projectZO( GLM_FUNC_DECL vec<3, T, Q> projectZO(
vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
/// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition) /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
/// ///
/// @param obj Specify the object coordinates. /// @param obj Specify the object coordinates.
/// @param model Specifies the current modelview matrix /// @param model Specifies the current modelview matrix
/// @param proj Specifies the current projection matrix /// @param proj Specifies the current projection matrix
@ -605,14 +605,14 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> projectNO( GLM_FUNC_DECL vec<3, T, Q> projectNO(
vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near and far clip planes definition. /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near and far clip planes definition.
/// To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE. /// To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
/// ///
/// @param obj Specify the object coordinates. /// @param obj Specify the object coordinates.
/// @param model Specifies the current modelview matrix /// @param model Specifies the current modelview matrix
/// @param proj Specifies the current projection matrix /// @param proj Specifies the current projection matrix
@ -621,7 +621,7 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> project( GLM_FUNC_DECL vec<3, T, Q> project(
vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
@ -637,7 +637,7 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> unProjectZO( GLM_FUNC_DECL vec<3, T, Q> unProjectZO(
vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
@ -653,7 +653,7 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> unProjectNO( GLM_FUNC_DECL vec<3, T, Q> unProjectNO(
vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
@ -669,7 +669,7 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
template<typename T, typename U, qualifier Q> template<typename T, typename U, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> unProject( GLM_FUNC_DECL vec<3, T, Q> unProject(
vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport); vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
@ -682,7 +682,7 @@ namespace glm
/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.
/// @tparam U Currently supported: Floating-point types and integer types. /// @tparam U Currently supported: Floating-point types and integer types.
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPickMatrix.xml">gluPickMatrix man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPickMatrix.xml">gluPickMatrix man page</a>
template<typename T, qualifier Q, typename U> template<typename T, qualifier Q, typename U>
GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix( GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport); vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport);
@ -716,7 +716,7 @@ namespace glm
/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) /// @see - frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
/// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">gluLookAt man page</a> /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">gluLookAt man page</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> lookAt( GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up); vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);

View File

@ -14,7 +14,7 @@ namespace glm
Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v)
{ {
@ -45,7 +45,7 @@ namespace glm
Result[3] = m[3]; Result[3] = m[3];
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate_slow(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v) GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate_slow(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v)
{ {
@ -361,7 +361,7 @@ namespace glm
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0)); assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
T const tanHalfFovy = tan(fovy / static_cast<T>(2)); T const tanHalfFovy = tan(fovy / static_cast<T>(2));
mat<4, 4, T, defaultp> Result(static_cast<T>(0)); mat<4, 4, T, defaultp> Result(static_cast<T>(0));
Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy); Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
Result[1][1] = static_cast<T>(1) / (tanHalfFovy); Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
@ -377,7 +377,7 @@ namespace glm
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0)); assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
T const tanHalfFovy = tan(fovy / static_cast<T>(2)); T const tanHalfFovy = tan(fovy / static_cast<T>(2));
mat<4, 4, T, defaultp> Result(static_cast<T>(0)); mat<4, 4, T, defaultp> Result(static_cast<T>(0));
Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy); Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
Result[1][1] = static_cast<T>(1) / (tanHalfFovy); Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
@ -447,7 +447,7 @@ namespace glm
assert(width > static_cast<T>(0)); assert(width > static_cast<T>(0));
assert(height > static_cast<T>(0)); assert(height > static_cast<T>(0));
assert(fov > static_cast<T>(0)); assert(fov > static_cast<T>(0));
T const rad = fov; T const rad = fov;
T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad); T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
T const w = h * height / width; ///todo max(width , Height) / min(width , Height)? T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
@ -467,7 +467,7 @@ namespace glm
assert(width > static_cast<T>(0)); assert(width > static_cast<T>(0));
assert(height > static_cast<T>(0)); assert(height > static_cast<T>(0));
assert(fov > static_cast<T>(0)); assert(fov > static_cast<T>(0));
T const rad = fov; T const rad = fov;
T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad); T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
T const w = h * height / width; ///todo max(width , Height) / min(width , Height)? T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
@ -487,7 +487,7 @@ namespace glm
assert(width > static_cast<T>(0)); assert(width > static_cast<T>(0));
assert(height > static_cast<T>(0)); assert(height > static_cast<T>(0));
assert(fov > static_cast<T>(0)); assert(fov > static_cast<T>(0));
T const rad = fov; T const rad = fov;
T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad); T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
T const w = h * height / width; ///todo max(width , Height) / min(width , Height)? T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
@ -507,7 +507,7 @@ namespace glm
assert(width > static_cast<T>(0)); assert(width > static_cast<T>(0));
assert(height > static_cast<T>(0)); assert(height > static_cast<T>(0));
assert(fov > static_cast<T>(0)); assert(fov > static_cast<T>(0));
T const rad = fov; T const rad = fov;
T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad); T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
T const w = h * height / width; ///todo max(width , Height) / min(width , Height)? T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
@ -625,7 +625,7 @@ namespace glm
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep) GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep)
{ {
T const range = tan(fovy / static_cast<T>(2)) * zNear; T const range = tan(fovy / static_cast<T>(2)) * zNear;
T const left = -range * aspect; T const left = -range * aspect;
T const right = range * aspect; T const right = range * aspect;
T const bottom = -range; T const bottom = -range;

View File

@ -8,10 +8,10 @@
/// ///
/// Include <glm/gtc/noise.hpp> to use the features of this extension. /// Include <glm/gtc/noise.hpp> to use the features of this extension.
/// ///
/// Defines 2D, 3D and 4D procedural noise functions /// Defines 2D, 3D and 4D procedural noise functions
/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
/// https://github.com/ashima/webgl-noise /// https://github.com/ashima/webgl-noise
/// Following Stefan Gustavson's paper "Simplex noise demystified": /// Following Stefan Gustavson's paper "Simplex noise demystified":
/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
#pragma once #pragma once
@ -41,7 +41,7 @@ namespace glm
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL T perlin( GLM_FUNC_DECL T perlin(
vec<L, T, Q> const& p); vec<L, T, Q> const& p);
/// Periodic perlin noise. /// Periodic perlin noise.
/// @see gtc_noise /// @see gtc_noise
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -1,9 +1,9 @@
/// @ref gtc_noise /// @ref gtc_noise
/// @file glm/gtc/noise.inl /// @file glm/gtc/noise.inl
/// ///
// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": // Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
// https://github.com/ashima/webgl-noise // https://github.com/ashima/webgl-noise
// Following Stefan Gustavson's paper "Simplex noise demystified": // Following Stefan Gustavson's paper "Simplex noise demystified":
// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
namespace glm{ namespace glm{
@ -15,7 +15,7 @@ namespace gtc
vec<3, T, Q> pXYZ = floor(fract(vec<3, T, Q>(j) * vec<3, T, Q>(ip)) * T(7)) * ip[2] - T(1); vec<3, T, Q> pXYZ = floor(fract(vec<3, T, Q>(j) * vec<3, T, Q>(ip)) * T(7)) * ip[2] - T(1);
T pW = static_cast<T>(1.5) - dot(abs(pXYZ), vec<3, T, Q>(1)); T pW = static_cast<T>(1.5) - dot(abs(pXYZ), vec<3, T, Q>(1));
vec<4, T, Q> s = vec<4, T, Q>(lessThan(vec<4, T, Q>(pXYZ, pW), vec<4, T, Q>(0.0))); vec<4, T, Q> s = vec<4, T, Q>(lessThan(vec<4, T, Q>(pXYZ, pW), vec<4, T, Q>(0.0)));
pXYZ = pXYZ + (vec<3, T, Q>(s) * T(2) - T(1)) * s.w; pXYZ = pXYZ + (vec<3, T, Q>(s) * T(2) - T(1)) * s.w;
return vec<4, T, Q>(pXYZ, pW); return vec<4, T, Q>(pXYZ, pW);
} }
}//namespace gtc }//namespace gtc
@ -128,7 +128,7 @@ namespace gtc
vec<3, T, Q> fade_xyz = detail::fade(Pf0); vec<3, T, Q> fade_xyz = detail::fade(Pf0);
vec<4, T, Q> n_z = mix(vec<4, T, Q>(n000, n100, n010, n110), vec<4, T, Q>(n001, n101, n011, n111), fade_xyz.z); vec<4, T, Q> n_z = mix(vec<4, T, Q>(n000, n100, n010, n110), vec<4, T, Q>(n001, n101, n011, n111), fade_xyz.z);
vec<2, T, Q> n_yz = mix(vec<2, T, Q>(n_z.x, n_z.y), vec<2, T, Q>(n_z.z, n_z.w), fade_xyz.y); vec<2, T, Q> n_yz = mix(vec<2, T, Q>(n_z.x, n_z.y), vec<2, T, Q>(n_z.z, n_z.w), fade_xyz.y);
T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
return T(2.2) * n_xyz; return T(2.2) * n_xyz;
} }
/* /*
@ -199,9 +199,9 @@ namespace gtc
vec<3, T, Q> fade_xyz = fade(Pf0); vec<3, T, Q> fade_xyz = fade(Pf0);
vec<4, T, Q> n_z = mix(vec<4, T, Q>(n000, n100, n010, n110), vec<4, T, Q>(n001, n101, n011, n111), fade_xyz.z); vec<4, T, Q> n_z = mix(vec<4, T, Q>(n000, n100, n010, n110), vec<4, T, Q>(n001, n101, n011, n111), fade_xyz.z);
vec<2, T, Q> n_yz = mix( vec<2, T, Q> n_yz = mix(
vec<2, T, Q>(n_z.x, n_z.y), vec<2, T, Q>(n_z.x, n_z.y),
vec<2, T, Q>(n_z.z, n_z.w), fade_xyz.y); vec<2, T, Q>(n_z.z, n_z.w), fade_xyz.y);
T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
return T(2.2) * n_xyz; return T(2.2) * n_xyz;
} }
*/ */
@ -619,7 +619,7 @@ namespace gtc
vec<3, T, Q> m = max(vec<3, T, Q>(0.5) - vec<3, T, Q>( vec<3, T, Q> m = max(vec<3, T, Q>(0.5) - vec<3, T, Q>(
dot(x0, x0), dot(x0, x0),
dot(vec<2, T, Q>(x12.x, x12.y), vec<2, T, Q>(x12.x, x12.y)), dot(vec<2, T, Q>(x12.x, x12.y), vec<2, T, Q>(x12.x, x12.y)),
dot(vec<2, T, Q>(x12.z, x12.w), vec<2, T, Q>(x12.z, x12.w))), vec<3, T, Q>(0)); dot(vec<2, T, Q>(x12.z, x12.w), vec<2, T, Q>(x12.z, x12.w))), vec<3, T, Q>(0));
m = m * m ; m = m * m ;
m = m * m ; m = m * m ;
@ -770,7 +770,7 @@ namespace gtc
vec<4, T, Q> x4 = x0 + C.w; vec<4, T, Q> x4 = x0 + C.w;
// Permutations // Permutations
i = mod(i, vec<4, T, Q>(289)); i = mod(i, vec<4, T, Q>(289));
T j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x); T j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);
vec<4, T, Q> j1 = detail::permute(detail::permute(detail::permute(detail::permute( vec<4, T, Q> j1 = detail::permute(detail::permute(detail::permute(detail::permute(
i.w + vec<4, T, Q>(i1.w, i2.w, i3.w, T(1))) + i.w + vec<4, T, Q>(i1.w, i2.w, i3.w, T(1))) +
@ -801,8 +801,8 @@ namespace gtc
vec<2, T, Q> m1 = max(T(0.6) - vec<2, T, Q>(dot(x3, x3), dot(x4, x4) ), vec<2, T, Q>(0)); vec<2, T, Q> m1 = max(T(0.6) - vec<2, T, Q>(dot(x3, x3), dot(x4, x4) ), vec<2, T, Q>(0));
m0 = m0 * m0; m0 = m0 * m0;
m1 = m1 * m1; m1 = m1 * m1;
return T(49) * return T(49) *
(dot(m0 * m0, vec<3, T, Q>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + (dot(m0 * m0, vec<3, T, Q>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) +
dot(m1 * m1, vec<2, T, Q>(dot(p3, x3), dot(p4, x4)))); dot(m1 * m1, vec<2, T, Q>(dot(p3, x3), dot(p4, x4))));
} }
}//namespace glm }//namespace glm

View File

@ -39,10 +39,10 @@ namespace glm
GLM_FUNC_DECL uint8 packUnorm1x8(float v); GLM_FUNC_DECL uint8 packUnorm1x8(float v);
/// Convert a single 8-bit integer to a normalized floating-point value. /// Convert a single 8-bit integer to a normalized floating-point value.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm4x8: f / 255.0 /// unpackUnorm4x8: f / 255.0
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec2 unpackUnorm2x8(uint16 p) /// @see vec2 unpackUnorm2x8(uint16 p)
/// @see vec4 unpackUnorm4x8(uint32 p) /// @see vec4 unpackUnorm4x8(uint32 p)
@ -66,22 +66,22 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v); GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm4x8: f / 255.0 /// unpackUnorm4x8: f / 255.0
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see float unpackUnorm1x8(uint8 v) /// @see float unpackUnorm1x8(uint8 v)
/// @see vec4 unpackUnorm4x8(uint32 p) /// @see vec4 unpackUnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p); GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
/// First, converts the normalized floating-point value v into 8-bit integer value. /// First, converts the normalized floating-point value v into 8-bit integer value.
/// Then, the results are packed into the returned 8-bit unsigned integer. /// Then, the results are packed into the returned 8-bit unsigned integer.
/// ///
@ -95,19 +95,19 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint8 packSnorm1x8(float s); GLM_FUNC_DECL uint8 packSnorm1x8(float s);
/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. /// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x8: clamp(f / 127.0, -1, +1) /// unpackSnorm1x8: clamp(f / 127.0, -1, +1)
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec2 unpackSnorm2x8(uint16 p) /// @see vec2 unpackSnorm2x8(uint16 p)
/// @see vec4 unpackSnorm4x8(uint32 p) /// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackSnorm1x8(uint8 p); GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values. /// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer. /// Then, the results are packed into the returned 16-bit unsigned integer.
/// ///
@ -124,22 +124,22 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v); GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v);
/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm2x8: clamp(f / 127.0, -1, +1) /// unpackSnorm2x8: clamp(f / 127.0, -1, +1)
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see float unpackSnorm1x8(uint8 p) /// @see float unpackSnorm1x8(uint8 p)
/// @see vec4 unpackSnorm4x8(uint32 p) /// @see vec4 unpackSnorm4x8(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p); GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
/// First, converts the normalized floating-point value v into a 16-bit integer value. /// First, converts the normalized floating-point value v into a 16-bit integer value.
/// Then, the results are packed into the returned 16-bit unsigned integer. /// Then, the results are packed into the returned 16-bit unsigned integer.
/// ///
@ -153,12 +153,12 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packUnorm1x16(float v); GLM_FUNC_DECL uint16 packUnorm1x16(float v);
/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. /// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar. /// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnorm1x16: f / 65535.0 /// unpackUnorm1x16: f / 65535.0
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec2 unpackUnorm2x16(uint32 p) /// @see vec2 unpackUnorm2x16(uint32 p)
/// @see vec4 unpackUnorm4x16(uint64 p) /// @see vec4 unpackUnorm4x16(uint64 p)
@ -182,15 +182,15 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v); GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. /// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackUnormx4x16: f / 65535.0 /// unpackUnormx4x16: f / 65535.0
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see float unpackUnorm1x16(uint16 p) /// @see float unpackUnorm1x16(uint16 p)
/// @see vec2 unpackUnorm2x16(uint32 p) /// @see vec2 unpackUnorm2x16(uint32 p)
@ -211,12 +211,12 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packSnorm1x16(float v); GLM_FUNC_DECL uint16 packSnorm1x16(float v);
/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. /// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned scalar. /// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm1x16: clamp(f / 32767.0, -1, +1) /// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec2 unpackSnorm2x16(uint32 p) /// @see vec2 unpackSnorm2x16(uint32 p)
/// @see vec4 unpackSnorm4x16(uint64 p) /// @see vec4 unpackSnorm4x16(uint64 p)
@ -240,22 +240,22 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v); GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v);
/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. /// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm4x16: clamp(f / 32767.0, -1, +1) /// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see float unpackSnorm1x16(uint16 p) /// @see float unpackSnorm1x16(uint16 p)
/// @see vec2 unpackSnorm2x16(uint32 p) /// @see vec2 unpackSnorm2x16(uint32 p)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm4x8 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p); GLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 p);
/// Returns an unsigned integer obtained by converting the components of a floating-point scalar /// Returns an unsigned integer obtained by converting the components of a floating-point scalar
/// to the 16-bit floating-point representation found in the OpenGL Specification, /// to the 16-bit floating-point representation found in the OpenGL Specification,
/// and then packing this 16-bit value into a 16-bit unsigned integer. /// and then packing this 16-bit value into a 16-bit unsigned integer.
@ -266,7 +266,7 @@ namespace glm
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint16 packHalf1x16(float v); GLM_FUNC_DECL uint16 packHalf1x16(float v);
/// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value, /// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value,
/// interpreted as a 16-bit floating-point number according to the OpenGL Specification, /// interpreted as a 16-bit floating-point number according to the OpenGL Specification,
/// and converting it to 32-bit floating-point values. /// and converting it to 32-bit floating-point values.
@ -278,25 +278,25 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL float unpackHalf1x16(uint16 v); GLM_FUNC_DECL float unpackHalf1x16(uint16 v);
/// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector /// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification, /// to the 16-bit floating-point representation found in the OpenGL Specification,
/// and then packing these four 16-bit values into a 64-bit unsigned integer. /// and then packing these four 16-bit values into a 64-bit unsigned integer.
/// The first vector component specifies the 16 least-significant bits of the result; /// The first vector component specifies the 16 least-significant bits of the result;
/// the forth component specifies the 16 most-significant bits. /// the forth component specifies the 16 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint16 packHalf1x16(float const& v) /// @see uint16 packHalf1x16(float const& v)
/// @see uint32 packHalf2x16(vec2 const& v) /// @see uint32 packHalf2x16(vec2 const& v)
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml">GLSL packHalf2x16 man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v); GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v);
/// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, /// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values,
/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification,
/// and converting them to 32-bit floating-point values. /// and converting them to 32-bit floating-point values.
/// The first component of the vector is obtained from the 16 least-significant bits of v; /// The first component of the vector is obtained from the 16 least-significant bits of v;
/// the forth component is obtained from the 16 most-significant bits of v. /// the forth component is obtained from the 16 most-significant bits of v.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see float unpackHalf1x16(uint16 const& v) /// @see float unpackHalf1x16(uint16 const& v)
/// @see vec2 unpackHalf2x16(uint32 const& v) /// @see vec2 unpackHalf2x16(uint32 const& v)
@ -304,12 +304,12 @@ namespace glm
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p); GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p);
/// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector /// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector
/// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, /// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification,
/// and then packing these four values into a 32-bit unsigned integer. /// and then packing these four values into a 32-bit unsigned integer.
/// The first vector component specifies the 10 least-significant bits of the result; /// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits. /// the forth component specifies the 2 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packI3x10_1x2(uvec4 const& v) /// @see uint32 packI3x10_1x2(uvec4 const& v)
/// @see uint32 packSnorm3x10_1x2(vec4 const& v) /// @see uint32 packSnorm3x10_1x2(vec4 const& v)
@ -317,23 +317,23 @@ namespace glm
/// @see ivec4 unpackI3x10_1x2(uint32 const& p) /// @see ivec4 unpackI3x10_1x2(uint32 const& p)
GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v); GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers.
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packU3x10_1x2(uvec4 const& v) /// @see uint32 packU3x10_1x2(uvec4 const& v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const& p); /// @see vec4 unpackSnorm3x10_1x2(uint32 const& p);
/// @see uvec4 unpackI3x10_1x2(uint32 const& p); /// @see uvec4 unpackI3x10_1x2(uint32 const& p);
GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p); GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p);
/// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector /// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector
/// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, /// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification,
/// and then packing these four values into a 32-bit unsigned integer. /// and then packing these four values into a 32-bit unsigned integer.
/// The first vector component specifies the 10 least-significant bits of the result; /// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits. /// the forth component specifies the 2 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packI3x10_1x2(ivec4 const& v) /// @see uint32 packI3x10_1x2(ivec4 const& v)
/// @see uint32 packSnorm3x10_1x2(vec4 const& v) /// @see uint32 packSnorm3x10_1x2(vec4 const& v)
@ -341,11 +341,11 @@ namespace glm
/// @see ivec4 unpackU3x10_1x2(uint32 const& p) /// @see ivec4 unpackU3x10_1x2(uint32 const& p)
GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v); GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v);
/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers.
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packU3x10_1x2(uvec4 const& v) /// @see uint32 packU3x10_1x2(uvec4 const& v)
/// @see vec4 unpackSnorm3x10_1x2(uint32 const& p); /// @see vec4 unpackSnorm3x10_1x2(uint32 const& p);
@ -360,7 +360,7 @@ namespace glm
/// packSnorm3x10_1x2(xyz): round(clamp(c, -1, +1) * 511.0) /// packSnorm3x10_1x2(xyz): round(clamp(c, -1, +1) * 511.0)
/// packSnorm3x10_1x2(w): round(clamp(c, -1, +1) * 1.0) /// packSnorm3x10_1x2(w): round(clamp(c, -1, +1) * 1.0)
/// ///
/// The first vector component specifies the 10 least-significant bits of the result; /// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits. /// the forth component specifies the 2 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
@ -370,16 +370,16 @@ namespace glm
/// @see uint32 packI3x10_1x2(ivec4 const& v) /// @see uint32 packI3x10_1x2(ivec4 const& v)
GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v); GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1) /// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1)
/// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1) /// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packSnorm3x10_1x2(vec4 const& v) /// @see uint32 packSnorm3x10_1x2(vec4 const& v)
/// @see vec4 unpackUnorm3x10_1x2(uint32 const& p)) /// @see vec4 unpackUnorm3x10_1x2(uint32 const& p))
@ -395,7 +395,7 @@ namespace glm
/// packUnorm3x10_1x2(xyz): round(clamp(c, 0, +1) * 1023.0) /// packUnorm3x10_1x2(xyz): round(clamp(c, 0, +1) * 1023.0)
/// packUnorm3x10_1x2(w): round(clamp(c, 0, +1) * 3.0) /// packUnorm3x10_1x2(w): round(clamp(c, 0, +1) * 3.0)
/// ///
/// The first vector component specifies the 10 least-significant bits of the result; /// The first vector component specifies the 10 least-significant bits of the result;
/// the forth component specifies the 2 most-significant bits. /// the forth component specifies the 2 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
@ -405,16 +405,16 @@ namespace glm
/// @see uint32 packI3x10_1x2(ivec4 const& v) /// @see uint32 packI3x10_1x2(ivec4 const& v)
GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v); GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v);
/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.
/// ///
/// The conversion for unpacked fixed-point value f to floating point is done as follows: /// The conversion for unpacked fixed-point value f to floating point is done as follows:
/// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1) /// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1)
/// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1) /// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packSnorm3x10_1x2(vec4 const& v) /// @see uint32 packSnorm3x10_1x2(vec4 const& v)
/// @see vec4 unpackInorm3x10_1x2(uint32 const& p)) /// @see vec4 unpackInorm3x10_1x2(uint32 const& p))
@ -426,19 +426,19 @@ namespace glm
/// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. /// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.
/// Then, the results are packed into the returned 32-bit unsigned integer. /// Then, the results are packed into the returned 32-bit unsigned integer.
/// ///
/// The first vector component specifies the 11 least-significant bits of the result; /// The first vector component specifies the 11 least-significant bits of the result;
/// the last component specifies the 10 most-significant bits. /// the last component specifies the 10 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec3 unpackF2x11_1x10(uint32 const& p) /// @see vec3 unpackF2x11_1x10(uint32 const& p)
GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v); GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v);
/// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value .
/// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packF2x11_1x10(vec3 const& v) /// @see uint32 packF2x11_1x10(vec3 const& v)
GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p); GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p);
@ -448,7 +448,7 @@ namespace glm
/// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value. /// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.
/// Then, the results are packed into the returned 32-bit unsigned integer. /// Then, the results are packed into the returned 32-bit unsigned integer.
/// ///
/// The first vector component specifies the 11 least-significant bits of the result; /// The first vector component specifies the 11 least-significant bits of the result;
/// the last component specifies the 10 most-significant bits. /// the last component specifies the 10 most-significant bits.
/// ///
/// packF3x9_E1x5 allows encoding into RGBE / RGB9E5 format /// packF3x9_E1x5 allows encoding into RGBE / RGB9E5 format
@ -457,10 +457,10 @@ namespace glm
/// @see vec3 unpackF3x9_E1x5(uint32 const& p) /// @see vec3 unpackF3x9_E1x5(uint32 const& p)
GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v); GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v);
/// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value .
/// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector. /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.
/// ///
/// The first component of the returned vector will be extracted from the least significant bits of the input; /// The first component of the returned vector will be extracted from the least significant bits of the input;
/// the last component will be extracted from the most significant bits. /// the last component will be extracted from the most significant bits.
/// ///
/// unpackF3x9_E1x5 allows decoding RGBE / RGB9E5 data /// unpackF3x9_E1x5 allows decoding RGBE / RGB9E5 data
@ -471,9 +471,9 @@ namespace glm
/// Returns an unsigned integer vector obtained by converting the components of a floating-point vector /// Returns an unsigned integer vector obtained by converting the components of a floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification. /// to the 16-bit floating-point representation found in the OpenGL Specification.
/// The first vector component specifies the 16 least-significant bits of the result; /// The first vector component specifies the 16 least-significant bits of the result;
/// the forth component specifies the 16 most-significant bits. /// the forth component specifies the 16 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& p) /// @see vec<3, T, Q> unpackRGBM(vec<4, T, Q> const& p)
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
@ -483,7 +483,7 @@ namespace glm
/// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values. /// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.
/// The first component of the vector is obtained from the 16 least-significant bits of v; /// The first component of the vector is obtained from the 16 least-significant bits of v;
/// the forth component is obtained from the 16 most-significant bits of v. /// the forth component is obtained from the 16 most-significant bits of v.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<4, T, Q> packRGBM(vec<3, float, Q> const& v) /// @see vec<4, T, Q> packRGBM(vec<3, float, Q> const& v)
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
@ -492,9 +492,9 @@ namespace glm
/// Returns an unsigned integer vector obtained by converting the components of a floating-point vector /// Returns an unsigned integer vector obtained by converting the components of a floating-point vector
/// to the 16-bit floating-point representation found in the OpenGL Specification. /// to the 16-bit floating-point representation found in the OpenGL Specification.
/// The first vector component specifies the 16 least-significant bits of the result; /// The first vector component specifies the 16 least-significant bits of the result;
/// the forth component specifies the 16 most-significant bits. /// the forth component specifies the 16 most-significant bits.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p) /// @see vec<L, float, Q> unpackHalf(vec<L, uint16, Q> const& p)
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
@ -504,7 +504,7 @@ namespace glm
/// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values. /// Returns a floating-point vector with components obtained by reinterpreting an integer vector as 16-bit floating-point numbers and converting them to 32-bit floating-point values.
/// The first component of the vector is obtained from the 16 least-significant bits of v; /// The first component of the vector is obtained from the 16 least-significant bits of v;
/// the forth component is obtained from the 16 most-significant bits of v. /// the forth component is obtained from the 16 most-significant bits of v.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v) /// @see vec<L, uint16, Q> packHalf(vec<L, float, Q> const& v)
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a>
@ -519,7 +519,7 @@ namespace glm
GLM_FUNC_DECL vec<L, uintType, Q> packUnorm(vec<L, floatType, Q> const& v); GLM_FUNC_DECL vec<L, uintType, Q> packUnorm(vec<L, floatType, Q> const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<L, intType, Q> packUnorm(vec<L, floatType, Q> const& v) /// @see vec<L, intType, Q> packUnorm(vec<L, floatType, Q> const& v)
template<typename floatType, length_t L, typename uintType, qualifier Q> template<typename floatType, length_t L, typename uintType, qualifier Q>
@ -533,7 +533,7 @@ namespace glm
GLM_FUNC_DECL vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v); GLM_FUNC_DECL vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v) /// @see vec<L, intType, Q> packSnorm(vec<L, floatType, Q> const& v)
template<typename floatType, length_t L, typename intType, qualifier Q> template<typename floatType, length_t L, typename intType, qualifier Q>
@ -546,7 +546,7 @@ namespace glm
GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v); GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint8 packUnorm2x4(vec2 const& v) /// @see uint8 packUnorm2x4(vec2 const& v)
GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p); GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p);
@ -558,7 +558,7 @@ namespace glm
GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v); GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint16 packUnorm4x4(vec4 const& v) /// @see uint16 packUnorm4x4(vec4 const& v)
GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p); GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p);
@ -570,7 +570,7 @@ namespace glm
GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v); GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint16 packUnorm1x5_1x6_1x5(vec3 const& v) /// @see uint16 packUnorm1x5_1x6_1x5(vec3 const& v)
GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p); GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p);
@ -582,7 +582,7 @@ namespace glm
GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v); GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint16 packUnorm3x5_1x1(vec4 const& v) /// @see uint16 packUnorm3x5_1x1(vec4 const& v)
GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p); GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p);
@ -594,7 +594,7 @@ namespace glm
GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v); GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v);
/// Convert a packed integer to a normalized floating-point vector. /// Convert a packed integer to a normalized floating-point vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint8 packUnorm2x3_1x2(vec3 const& v) /// @see uint8 packUnorm2x3_1x2(vec3 const& v)
GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p); GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p);
@ -608,7 +608,7 @@ namespace glm
GLM_FUNC_DECL int16 packInt2x8(i8vec2 const& v); GLM_FUNC_DECL int16 packInt2x8(i8vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int16 packInt2x8(i8vec2 const& v) /// @see int16 packInt2x8(i8vec2 const& v)
GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p); GLM_FUNC_DECL i8vec2 unpackInt2x8(int16 p);
@ -620,7 +620,7 @@ namespace glm
GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const& v); GLM_FUNC_DECL uint16 packUint2x8(u8vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint16 packInt2x8(u8vec2 const& v) /// @see uint16 packInt2x8(u8vec2 const& v)
GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p); GLM_FUNC_DECL u8vec2 unpackUint2x8(uint16 p);
@ -632,7 +632,7 @@ namespace glm
GLM_FUNC_DECL int32 packInt4x8(i8vec4 const& v); GLM_FUNC_DECL int32 packInt4x8(i8vec4 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int32 packInt2x8(i8vec4 const& v) /// @see int32 packInt2x8(i8vec4 const& v)
GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p); GLM_FUNC_DECL i8vec4 unpackInt4x8(int32 p);
@ -644,7 +644,7 @@ namespace glm
GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const& v); GLM_FUNC_DECL uint32 packUint4x8(u8vec4 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint32 packUint4x8(u8vec2 const& v) /// @see uint32 packUint4x8(u8vec2 const& v)
GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p); GLM_FUNC_DECL u8vec4 unpackUint4x8(uint32 p);
@ -656,7 +656,7 @@ namespace glm
GLM_FUNC_DECL int packInt2x16(i16vec2 const& v); GLM_FUNC_DECL int packInt2x16(i16vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int packInt2x16(i16vec2 const& v) /// @see int packInt2x16(i16vec2 const& v)
GLM_FUNC_DECL i16vec2 unpackInt2x16(int p); GLM_FUNC_DECL i16vec2 unpackInt2x16(int p);
@ -668,7 +668,7 @@ namespace glm
GLM_FUNC_DECL int64 packInt4x16(i16vec4 const& v); GLM_FUNC_DECL int64 packInt4x16(i16vec4 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int64 packInt4x16(i16vec4 const& v) /// @see int64 packInt4x16(i16vec4 const& v)
GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p); GLM_FUNC_DECL i16vec4 unpackInt4x16(int64 p);
@ -680,7 +680,7 @@ namespace glm
GLM_FUNC_DECL uint packUint2x16(u16vec2 const& v); GLM_FUNC_DECL uint packUint2x16(u16vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint packUint2x16(u16vec2 const& v) /// @see uint packUint2x16(u16vec2 const& v)
GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p); GLM_FUNC_DECL u16vec2 unpackUint2x16(uint p);
@ -692,7 +692,7 @@ namespace glm
GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const& v); GLM_FUNC_DECL uint64 packUint4x16(u16vec4 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see uint64 packUint4x16(u16vec4 const& v) /// @see uint64 packUint4x16(u16vec4 const& v)
GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p); GLM_FUNC_DECL u16vec4 unpackUint4x16(uint64 p);
@ -704,7 +704,7 @@ namespace glm
GLM_FUNC_DECL int64 packInt2x32(i32vec2 const& v); GLM_FUNC_DECL int64 packInt2x32(i32vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int packInt2x16(i32vec2 const& v) /// @see int packInt2x16(i32vec2 const& v)
GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p); GLM_FUNC_DECL i32vec2 unpackInt2x32(int64 p);
@ -716,7 +716,7 @@ namespace glm
GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const& v); GLM_FUNC_DECL uint64 packUint2x32(u32vec2 const& v);
/// Convert a packed integer into an integer vector. /// Convert a packed integer into an integer vector.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see int packUint2x16(u32vec2 const& v) /// @see int packUint2x16(u32vec2 const& v)
GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p); GLM_FUNC_DECL u32vec2 unpackUint2x32(uint64 p);

View File

@ -356,13 +356,13 @@ namespace detail
{ {
return static_cast<uint8>(round(clamp(v, 0.0f, 1.0f) * 255.0f)); return static_cast<uint8>(round(clamp(v, 0.0f, 1.0f) * 255.0f));
} }
GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 p) GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 p)
{ {
float const Unpack(p); float const Unpack(p);
return Unpack * static_cast<float>(0.0039215686274509803921568627451); // 1 / 255 return Unpack * static_cast<float>(0.0039215686274509803921568627451); // 1 / 255
} }
GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const& v) GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const& v)
{ {
u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f)); u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
@ -371,7 +371,7 @@ namespace detail
memcpy(&Unpack, &Topack, sizeof(Unpack)); memcpy(&Unpack, &Topack, sizeof(Unpack));
return Unpack; return Unpack;
} }
GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p) GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p)
{ {
u8vec2 Unpack; u8vec2 Unpack;
@ -386,7 +386,7 @@ namespace detail
memcpy(&Packed, &Topack, sizeof(Packed)); memcpy(&Packed, &Topack, sizeof(Packed));
return Packed; return Packed;
} }
GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p) GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p)
{ {
int8 Unpack = 0; int8 Unpack = 0;
@ -395,7 +395,7 @@ namespace detail
static_cast<float>(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f static_cast<float>(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f
-1.0f, 1.0f); -1.0f, 1.0f);
} }
GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const& v) GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const& v)
{ {
i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f)); i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f));
@ -403,7 +403,7 @@ namespace detail
memcpy(&Packed, &Topack, sizeof(Packed)); memcpy(&Packed, &Topack, sizeof(Packed));
return Packed; return Packed;
} }
GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p) GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p)
{ {
i8vec2 Unpack; i8vec2 Unpack;
@ -452,7 +452,7 @@ namespace detail
int16 Unpack = 0; int16 Unpack = 0;
memcpy(&Unpack, &p, sizeof(Unpack)); memcpy(&Unpack, &p, sizeof(Unpack));
return clamp( return clamp(
static_cast<float>(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, static_cast<float>(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
-1.0f, 1.0f); -1.0f, 1.0f);
} }
@ -518,7 +518,7 @@ namespace detail
Result.data.y = v.y; Result.data.y = v.y;
Result.data.z = v.z; Result.data.z = v.z;
Result.data.w = v.w; Result.data.w = v.w;
return Result.pack; return Result.pack;
} }
GLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 v) GLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 v)
@ -539,7 +539,7 @@ namespace detail
Result.data.y = v.y; Result.data.y = v.y;
Result.data.z = v.z; Result.data.z = v.z;
Result.data.w = v.w; Result.data.w = v.w;
return Result.pack; return Result.pack;
} }
GLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 v) GLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 v)

View File

@ -49,13 +49,13 @@ namespace glm
# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
# pragma clang diagnostic ignored "-Wnested-anon-types" # pragma clang diagnostic ignored "-Wnested-anon-types"
# endif # endif
union union
{ {
struct { T x, y, z, w;}; struct { T x, y, z, w;};
typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<Q>::value>::type data; typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<Q>::value>::type data;
}; };
# if GLM_COMPILER & GLM_COMPILER_CLANG # if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop # pragma clang diagnostic pop
# endif # endif
@ -178,7 +178,7 @@ namespace glm
GLM_FUNC_DECL bool operator!=(tquat<T, Q> const& q1, tquat<T, Q> const& q2); GLM_FUNC_DECL bool operator!=(tquat<T, Q> const& q1, tquat<T, Q> const& q2);
/// Returns the length of the quaternion. /// Returns the length of the quaternion.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -186,15 +186,15 @@ namespace glm
GLM_FUNC_DECL T length(tquat<T, Q> const& q); GLM_FUNC_DECL T length(tquat<T, Q> const& q);
/// Returns the normalized quaternion. /// Returns the normalized quaternion.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL tquat<T, Q> normalize(tquat<T, Q> const& q); GLM_FUNC_DECL tquat<T, Q> normalize(tquat<T, Q> const& q);
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -204,7 +204,7 @@ namespace glm
/// Spherical linear interpolation of two quaternions. /// Spherical linear interpolation of two quaternions.
/// The interpolation is oriented and the rotation is performed at constant speed. /// The interpolation is oriented and the rotation is performed at constant speed.
/// For short path spherical linear interpolation, use the slerp function. /// For short path spherical linear interpolation, use the slerp function.
/// ///
/// @param x A quaternion /// @param x A quaternion
/// @param y A quaternion /// @param y A quaternion
/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
@ -217,7 +217,7 @@ namespace glm
/// Linear interpolation of two quaternions. /// Linear interpolation of two quaternions.
/// The interpolation is oriented. /// The interpolation is oriented.
/// ///
/// @param x A quaternion /// @param x A quaternion
/// @param y A quaternion /// @param y A quaternion
/// @param a Interpolation factor. The interpolation is defined in the range [0, 1]. /// @param a Interpolation factor. The interpolation is defined in the range [0, 1].
@ -229,7 +229,7 @@ namespace glm
/// Spherical linear interpolation of two quaternions. /// Spherical linear interpolation of two quaternions.
/// The interpolation always take the short path and the rotation is performed at constant speed. /// The interpolation always take the short path and the rotation is performed at constant speed.
/// ///
/// @param x A quaternion /// @param x A quaternion
/// @param y A quaternion /// @param y A quaternion
/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
@ -240,7 +240,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, Q> slerp(tquat<T, Q> const& x, tquat<T, Q> const& y, T a); GLM_FUNC_DECL tquat<T, Q> slerp(tquat<T, Q> const& x, tquat<T, Q> const& y, T a);
/// Returns the q conjugate. /// Returns the q conjugate.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -248,7 +248,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, Q> conjugate(tquat<T, Q> const& q); GLM_FUNC_DECL tquat<T, Q> conjugate(tquat<T, Q> const& q);
/// Returns the q inverse. /// Returns the q inverse.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -256,7 +256,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, Q> inverse(tquat<T, Q> const& q); GLM_FUNC_DECL tquat<T, Q> inverse(tquat<T, Q> const& q);
/// Rotates a quaternion from a vector of 3 components axis and an angle. /// Rotates a quaternion from a vector of 3 components axis and an angle.
/// ///
/// @param q Source orientation /// @param q Source orientation
/// @param angle Angle expressed in radians. /// @param angle Angle expressed in radians.
/// @param axis Axis of the rotation /// @param axis Axis of the rotation
@ -300,7 +300,7 @@ namespace glm
GLM_FUNC_DECL T yaw(tquat<T, Q> const& x); GLM_FUNC_DECL T yaw(tquat<T, Q> const& x);
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -308,7 +308,7 @@ namespace glm
GLM_FUNC_DECL mat<3, 3, T, Q> mat3_cast(tquat<T, Q> const& x); GLM_FUNC_DECL mat<3, 3, T, Q> mat3_cast(tquat<T, Q> const& x);
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -316,7 +316,7 @@ namespace glm
GLM_FUNC_DECL mat<4, 4, T, Q> mat4_cast(tquat<T, Q> const& x); GLM_FUNC_DECL mat<4, 4, T, Q> mat4_cast(tquat<T, Q> const& x);
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -324,7 +324,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, Q> quat_cast(mat<3, 3, T, Q> const& x); GLM_FUNC_DECL tquat<T, Q> quat_cast(mat<3, 3, T, Q> const& x);
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -358,7 +358,7 @@ namespace glm
GLM_FUNC_DECL tquat<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& axis); GLM_FUNC_DECL tquat<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& axis);
/// Returns the component-wise comparison result of x < y. /// Returns the component-wise comparison result of x < y.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -398,7 +398,7 @@ namespace glm
GLM_FUNC_DECL vec<4, bool, Q> equal(tquat<T, Q> const& x, tquat<T, Q> const& y); GLM_FUNC_DECL vec<4, bool, Q> equal(tquat<T, Q> const& x, tquat<T, Q> const& y);
/// Returns the component-wise comparison of result x != y. /// Returns the component-wise comparison of result x != y.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -410,9 +410,9 @@ namespace glm
/// floating point representations. Returns false otherwise, /// floating point representations. Returns false otherwise,
/// including for implementations with no NaN /// including for implementations with no NaN
/// representations. /// representations.
/// ///
/// /!\ When using compiler fast math, this function may fail. /// /!\ When using compiler fast math, this function may fail.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
@ -424,7 +424,7 @@ namespace glm
/// set of floating point representations. Returns false /// set of floating point representations. Returns false
/// otherwise, including for implementations with no infinity /// otherwise, including for implementations with no infinity
/// representations. /// representations.
/// ///
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion

View File

@ -127,7 +127,7 @@ namespace detail
, w(static_cast<T>(q.w)) , w(static_cast<T>(q.w))
{} {}
//template<typename valType> //template<typename valType>
//GLM_FUNC_QUALIFIER tquat<valType>::tquat //GLM_FUNC_QUALIFIER tquat<valType>::tquat
//( //(
// valType const& pitch, // valType const& pitch,
@ -138,7 +138,7 @@ namespace detail
// vec<3, valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); // vec<3, valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));
// vec<3, valType> c = glm::cos(eulerAngle * valType(0.5)); // vec<3, valType> c = glm::cos(eulerAngle * valType(0.5));
// vec<3, valType> s = glm::sin(eulerAngle * valType(0.5)); // vec<3, valType> s = glm::sin(eulerAngle * valType(0.5));
// //
// this->w = c.x * c.y * c.z + s.x * s.y * s.z; // this->w = c.x * c.y * c.z + s.x * s.y * s.z;
// this->x = s.x * c.y * c.z - c.x * s.y * s.z; // this->x = s.x * c.y * c.z - c.x * s.y * s.z;
// this->y = c.x * s.y * c.z + s.x * c.y * s.z; // this->y = c.x * s.y * c.z + s.x * c.y * s.z;
@ -174,7 +174,7 @@ namespace detail
{ {
vec<3, T, Q> c = glm::cos(eulerAngle * T(0.5)); vec<3, T, Q> c = glm::cos(eulerAngle * T(0.5));
vec<3, T, Q> s = glm::sin(eulerAngle * T(0.5)); vec<3, T, Q> s = glm::sin(eulerAngle * T(0.5));
this->w = c.x * c.y * c.z + s.x * s.y * s.z; this->w = c.x * c.y * c.z + s.x * s.y * s.z;
this->x = s.x * c.y * c.z - c.x * s.y * s.z; this->x = s.x * c.y * c.z - c.x * s.y * s.z;
this->y = c.x * s.y * c.z + s.x * c.y * s.z; this->y = c.x * s.y * c.z + s.x * c.y * s.z;
@ -199,7 +199,7 @@ namespace detail
{ {
return mat3_cast(*this); return mat3_cast(*this);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER tquat<T, Q>::operator mat<4, 4, T, Q>() GLM_FUNC_QUALIFIER tquat<T, Q>::operator mat<4, 4, T, Q>()
{ {
@ -458,8 +458,8 @@ namespace detail
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER tquat<T, Q> mix2 GLM_FUNC_QUALIFIER tquat<T, Q> mix2
( (
tquat<T, Q> const& x, tquat<T, Q> const& x,
tquat<T, Q> const& y, tquat<T, Q> const& y,
T const& a T const& a
) )
{ {
@ -488,7 +488,7 @@ namespace detail
if(flip) if(flip)
alpha = -alpha; alpha = -alpha;
return normalize(beta * x + alpha * y); return normalize(beta * x + alpha * y);
} }
*/ */
@ -533,7 +533,7 @@ namespace detail
T cosTheta = dot(x, y); T cosTheta = dot(x, y);
// If cosTheta < 0, the interpolation will take the long way around the sphere. // If cosTheta < 0, the interpolation will take the long way around the sphere.
// To fix this, one quat must be negated. // To fix this, one quat must be negated.
if (cosTheta < T(0)) if (cosTheta < T(0))
{ {

View File

@ -176,7 +176,7 @@ namespace detail
__m128 const q_swp1 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 1, 0, 2)); __m128 const q_swp1 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 1, 0, 2));
__m128 const v_swp0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 0, 2, 1)); __m128 const v_swp0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 0, 2, 1));
__m128 const v_swp1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 1, 0, 2)); __m128 const v_swp1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 1, 0, 2));
__m128 uv = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0)); __m128 uv = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0));
__m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1)); __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1));
__m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2)); __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2));

View File

@ -25,52 +25,52 @@ namespace glm
{ {
/// @addtogroup gtc_random /// @addtogroup gtc_random
/// @{ /// @{
/// Generate random numbers in the interval [Min, Max], according a linear distribution /// Generate random numbers in the interval [Min, Max], according a linear distribution
/// ///
/// @param Min Minimum value included in the sampling /// @param Min Minimum value included in the sampling
/// @param Max Maximum value included in the sampling /// @param Max Maximum value included in the sampling
/// @tparam genType Value type. Currently supported: float or double scalars. /// @tparam genType Value type. Currently supported: float or double scalars.
/// @see gtc_random /// @see gtc_random
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType linearRand(genType Min, genType Max); GLM_FUNC_DECL genType linearRand(genType Min, genType Max);
/// Generate random numbers in the interval [Min, Max], according a linear distribution /// Generate random numbers in the interval [Min, Max], according a linear distribution
/// ///
/// @param Min Minimum value included in the sampling /// @param Min Minimum value included in the sampling
/// @param Max Maximum value included in the sampling /// @param Max Maximum value included in the sampling
/// @tparam T Value type. Currently supported: float or double. /// @tparam T Value type. Currently supported: float or double.
/// ///
/// @see gtc_random /// @see gtc_random
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> linearRand(vec<L, T, Q> const& Min, vec<L, T, Q> const& Max); GLM_FUNC_DECL vec<L, T, Q> linearRand(vec<L, T, Q> const& Min, vec<L, T, Q> const& Max);
/// Generate random numbers in the interval [Min, Max], according a gaussian distribution /// Generate random numbers in the interval [Min, Max], according a gaussian distribution
/// ///
/// @see gtc_random /// @see gtc_random
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation); GLM_FUNC_DECL genType gaussRand(genType Mean, genType Deviation);
/// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius
/// ///
/// @see gtc_random /// @see gtc_random
template<typename T> template<typename T>
GLM_FUNC_DECL vec<2, T, defaultp> circularRand(T Radius); GLM_FUNC_DECL vec<2, T, defaultp> circularRand(T Radius);
/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius
/// ///
/// @see gtc_random /// @see gtc_random
template<typename T> template<typename T>
GLM_FUNC_DECL vec<3, T, defaultp> sphericalRand(T Radius); GLM_FUNC_DECL vec<3, T, defaultp> sphericalRand(T Radius);
/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius
/// ///
/// @see gtc_random /// @see gtc_random
template<typename T> template<typename T>
GLM_FUNC_DECL vec<2, T, defaultp> diskRand(T Radius); GLM_FUNC_DECL vec<2, T, defaultp> diskRand(T Radius);
/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius
/// ///
/// @see gtc_random /// @see gtc_random
template<typename T> template<typename T>
GLM_FUNC_DECL vec<3, T, defaultp> ballRand(T Radius); GLM_FUNC_DECL vec<3, T, defaultp> ballRand(T Radius);

View File

@ -157,7 +157,7 @@ namespace detail
return (compute_rand<L, uint32, Q>::call() % (Max + static_cast<uint32>(1) - Min)) + Min; return (compute_rand<L, uint32, Q>::call() % (Max + static_cast<uint32>(1) - Min)) + Min;
} }
}; };
template<length_t L, qualifier Q> template<length_t L, qualifier Q>
struct compute_linearRand<L, int64, Q> struct compute_linearRand<L, int64, Q>
{ {
@ -281,7 +281,7 @@ namespace detail
{ {
x1 = linearRand(genType(-1), genType(1)); x1 = linearRand(genType(-1), genType(1));
x2 = linearRand(genType(-1), genType(1)); x2 = linearRand(genType(-1), genType(1));
w = x1 * x1 + x2 * x2; w = x1 * x1 + x2 * x2;
} while(w > genType(1)); } while(w > genType(1));
@ -296,7 +296,7 @@ namespace detail
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER vec<2, T, defaultp> diskRand(T Radius) GLM_FUNC_QUALIFIER vec<2, T, defaultp> diskRand(T Radius)
{ {
vec<2, T, defaultp> Result(T(0)); vec<2, T, defaultp> Result(T(0));
T LenRadius(T(0)); T LenRadius(T(0));
@ -317,7 +317,7 @@ namespace detail
{ {
vec<3, T, defaultp> Result(T(0)); vec<3, T, defaultp> Result(T(0));
T LenRadius(T(0)); T LenRadius(T(0));
do do
{ {
Result = linearRand( Result = linearRand(
@ -326,7 +326,7 @@ namespace detail
LenRadius = length(Result); LenRadius = length(Result);
} }
while(LenRadius > Radius); while(LenRadius > Radius);
return Result; return Result;
} }

View File

@ -26,105 +26,105 @@ namespace glm
/// Secant function. /// Secant function.
/// hypotenuse / adjacent or 1 / cos(x) /// hypotenuse / adjacent or 1 / cos(x)
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType sec(genType angle); GLM_FUNC_DECL genType sec(genType angle);
/// Cosecant function. /// Cosecant function.
/// hypotenuse / opposite or 1 / sin(x) /// hypotenuse / opposite or 1 / sin(x)
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType csc(genType angle); GLM_FUNC_DECL genType csc(genType angle);
/// Cotangent function. /// Cotangent function.
/// adjacent / opposite or 1 / tan(x) /// adjacent / opposite or 1 / tan(x)
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType cot(genType angle); GLM_FUNC_DECL genType cot(genType angle);
/// Inverse secant function. /// Inverse secant function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType asec(genType x); GLM_FUNC_DECL genType asec(genType x);
/// Inverse cosecant function. /// Inverse cosecant function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType acsc(genType x); GLM_FUNC_DECL genType acsc(genType x);
/// Inverse cotangent function. /// Inverse cotangent function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType acot(genType x); GLM_FUNC_DECL genType acot(genType x);
/// Secant hyperbolic function. /// Secant hyperbolic function.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType sech(genType angle); GLM_FUNC_DECL genType sech(genType angle);
/// Cosecant hyperbolic function. /// Cosecant hyperbolic function.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType csch(genType angle); GLM_FUNC_DECL genType csch(genType angle);
/// Cotangent hyperbolic function. /// Cotangent hyperbolic function.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType coth(genType angle); GLM_FUNC_DECL genType coth(genType angle);
/// Inverse secant hyperbolic function. /// Inverse secant hyperbolic function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType asech(genType x); GLM_FUNC_DECL genType asech(genType x);
/// Inverse cosecant hyperbolic function. /// Inverse cosecant hyperbolic function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType acsch(genType x); GLM_FUNC_DECL genType acsch(genType x);
/// Inverse cotangent hyperbolic function. /// Inverse cotangent hyperbolic function.
/// ///
/// @return Return an angle expressed in radians. /// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @see gtc_reciprocal /// @see gtc_reciprocal
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType acoth(genType x); GLM_FUNC_DECL genType acoth(genType x);

View File

@ -41,7 +41,7 @@ namespace glm
GLM_FUNC_QUALIFIER genType cot(genType angle) GLM_FUNC_QUALIFIER genType cot(genType angle)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'cot' only accept floating-point values"); GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'cot' only accept floating-point values");
genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0);
return glm::tan(pi_over_2 - angle); return glm::tan(pi_over_2 - angle);
} }

View File

@ -10,7 +10,7 @@
/// Include <glm/gtc/type_precision.hpp> to use the features of this extension. /// Include <glm/gtc/type_precision.hpp> to use the features of this extension.
/// ///
/// Defines specific C++-based qualifier types. /// Defines specific C++-based qualifier types.
/// ///
/// @ref core_precision defines types based on GLSL's qualifier qualifiers. This /// @ref core_precision defines types based on GLSL's qualifier qualifiers. This
/// extension defines types based on explicitly-sized C++ data types. /// extension defines types based on explicitly-sized C++ data types.
@ -39,7 +39,7 @@
namespace glm namespace glm
{ {
/////////////////////////// ///////////////////////////
// Signed int vector types // Signed int vector types
/// @addtogroup gtc_type_precision /// @addtogroup gtc_type_precision
/// @{ /// @{
@ -47,7 +47,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_int8; typedef detail::int8 lowp_int8;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_int16; typedef detail::int16 lowp_int16;
@ -63,7 +63,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_int8_t; typedef detail::int8 lowp_int8_t;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_int16_t; typedef detail::int16 lowp_int16_t;
@ -79,7 +79,7 @@ namespace glm
/// Low qualifier 8 bit signed integer type. /// Low qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 lowp_i8; typedef detail::int8 lowp_i8;
/// Low qualifier 16 bit signed integer type. /// Low qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 lowp_i16; typedef detail::int16 lowp_i16;
@ -95,7 +95,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_int8; typedef detail::int8 mediump_int8;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_int16; typedef detail::int16 mediump_int16;
@ -111,7 +111,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_int8_t; typedef detail::int8 mediump_int8_t;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_int16_t; typedef detail::int16 mediump_int16_t;
@ -127,7 +127,7 @@ namespace glm
/// Medium qualifier 8 bit signed integer type. /// Medium qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 mediump_i8; typedef detail::int8 mediump_i8;
/// Medium qualifier 16 bit signed integer type. /// Medium qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 mediump_i16; typedef detail::int16 mediump_i16;
@ -143,7 +143,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_int8; typedef detail::int8 highp_int8;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_int16; typedef detail::int16 highp_int16;
@ -159,7 +159,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_int8_t; typedef detail::int8 highp_int8_t;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_int16_t; typedef detail::int16 highp_int16_t;
@ -175,7 +175,7 @@ namespace glm
/// High qualifier 8 bit signed integer type. /// High qualifier 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 highp_i8; typedef detail::int8 highp_i8;
/// High qualifier 16 bit signed integer type. /// High qualifier 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 highp_i16; typedef detail::int16 highp_i16;
@ -187,12 +187,12 @@ namespace glm
/// High qualifier 64 bit signed integer type. /// High qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 highp_i64; typedef detail::int64 highp_i64;
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 int8; typedef detail::int8 int8;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 int16; typedef detail::int16 int16;
@ -214,7 +214,7 @@ namespace glm
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 int8_t; typedef detail::int8 int8_t;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 int16_t; typedef detail::int16 int16_t;
@ -231,7 +231,7 @@ namespace glm
/// 8 bit signed integer type. /// 8 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int8 i8; typedef detail::int8 i8;
/// 16 bit signed integer type. /// 16 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int16 i16; typedef detail::int16 i16;
@ -248,7 +248,7 @@ namespace glm
/// 8 bit signed integer scalar type. /// 8 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i8, defaultp> i8vec1; typedef vec<1, i8, defaultp> i8vec1;
/// 8 bit signed integer vector of 2 components type. /// 8 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i8, defaultp> i8vec2; typedef vec<2, i8, defaultp> i8vec2;
@ -265,7 +265,7 @@ namespace glm
/// 16 bit signed integer scalar type. /// 16 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i16, defaultp> i16vec1; typedef vec<1, i16, defaultp> i16vec1;
/// 16 bit signed integer vector of 2 components type. /// 16 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i16, defaultp> i16vec2; typedef vec<2, i16, defaultp> i16vec2;
@ -282,7 +282,7 @@ namespace glm
/// 32 bit signed integer scalar type. /// 32 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i32, defaultp> i32vec1; typedef vec<1, i32, defaultp> i32vec1;
/// 32 bit signed integer vector of 2 components type. /// 32 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i32, defaultp> i32vec2; typedef vec<2, i32, defaultp> i32vec2;
@ -299,7 +299,7 @@ namespace glm
/// 64 bit signed integer scalar type. /// 64 bit signed integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, i64, defaultp> i64vec1; typedef vec<1, i64, defaultp> i64vec1;
/// 64 bit signed integer vector of 2 components type. /// 64 bit signed integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, i64, defaultp> i64vec2; typedef vec<2, i64, defaultp> i64vec2;
@ -319,7 +319,7 @@ namespace glm
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_uint8; typedef detail::uint8 lowp_uint8;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_uint16; typedef detail::uint16 lowp_uint16;
@ -335,7 +335,7 @@ namespace glm
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_uint8_t; typedef detail::uint8 lowp_uint8_t;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_uint16_t; typedef detail::uint16 lowp_uint16_t;
@ -351,7 +351,7 @@ namespace glm
/// Low qualifier 8 bit unsigned integer type. /// Low qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 lowp_u8; typedef detail::uint8 lowp_u8;
/// Low qualifier 16 bit unsigned integer type. /// Low qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 lowp_u16; typedef detail::uint16 lowp_u16;
@ -363,11 +363,11 @@ namespace glm
/// Low qualifier 64 bit unsigned integer type. /// Low qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 lowp_u64; typedef detail::uint64 lowp_u64;
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_uint8; typedef detail::uint8 mediump_uint8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_uint16; typedef detail::uint16 mediump_uint16;
@ -383,7 +383,7 @@ namespace glm
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_uint8_t; typedef detail::uint8 mediump_uint8_t;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_uint16_t; typedef detail::uint16 mediump_uint16_t;
@ -399,7 +399,7 @@ namespace glm
/// Medium qualifier 8 bit unsigned integer type. /// Medium qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 mediump_u8; typedef detail::uint8 mediump_u8;
/// Medium qualifier 16 bit unsigned integer type. /// Medium qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 mediump_u16; typedef detail::uint16 mediump_u16;
@ -411,11 +411,11 @@ namespace glm
/// Medium qualifier 64 bit unsigned integer type. /// Medium qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 mediump_u64; typedef detail::uint64 mediump_u64;
/// High qualifier 8 bit unsigned integer type. /// High qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_uint8; typedef detail::uint8 highp_uint8;
/// High qualifier 16 bit unsigned integer type. /// High qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_uint16; typedef detail::uint16 highp_uint16;
@ -431,7 +431,7 @@ namespace glm
/// High qualifier 8 bit unsigned integer type. /// High qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_uint8_t; typedef detail::uint8 highp_uint8_t;
/// High qualifier 16 bit unsigned integer type. /// High qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_uint16_t; typedef detail::uint16 highp_uint16_t;
@ -447,7 +447,7 @@ namespace glm
/// High qualifier 8 bit unsigned integer type. /// High qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 highp_u8; typedef detail::uint8 highp_u8;
/// High qualifier 16 bit unsigned integer type. /// High qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 highp_u16; typedef detail::uint16 highp_u16;
@ -463,7 +463,7 @@ namespace glm
/// Default qualifier 8 bit unsigned integer type. /// Default qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 uint8; typedef detail::uint8 uint8;
/// Default qualifier 16 bit unsigned integer type. /// Default qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 uint16; typedef detail::uint16 uint16;
@ -485,7 +485,7 @@ namespace glm
/// Default qualifier 8 bit unsigned integer type. /// Default qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 uint8_t; typedef detail::uint8 uint8_t;
/// Default qualifier 16 bit unsigned integer type. /// Default qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 uint16_t; typedef detail::uint16 uint16_t;
@ -502,7 +502,7 @@ namespace glm
/// Default qualifier 8 bit unsigned integer type. /// Default qualifier 8 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint8 u8; typedef detail::uint8 u8;
/// Default qualifier 16 bit unsigned integer type. /// Default qualifier 16 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint16 u16; typedef detail::uint16 u16;
@ -520,7 +520,7 @@ namespace glm
/// Default qualifier 8 bit unsigned integer scalar type. /// Default qualifier 8 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u8, defaultp> u8vec1; typedef vec<1, u8, defaultp> u8vec1;
/// Default qualifier 8 bit unsigned integer vector of 2 components type. /// Default qualifier 8 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, u8, defaultp> u8vec2; typedef vec<2, u8, defaultp> u8vec2;
@ -537,7 +537,7 @@ namespace glm
/// Default qualifier 16 bit unsigned integer scalar type. /// Default qualifier 16 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u16, defaultp> u16vec1; typedef vec<1, u16, defaultp> u16vec1;
/// Default qualifier 16 bit unsigned integer vector of 2 components type. /// Default qualifier 16 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, u16, defaultp> u16vec2; typedef vec<2, u16, defaultp> u16vec2;
@ -554,7 +554,7 @@ namespace glm
/// Default qualifier 32 bit unsigned integer scalar type. /// Default qualifier 32 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u32, defaultp> u32vec1; typedef vec<1, u32, defaultp> u32vec1;
/// Default qualifier 32 bit unsigned integer vector of 2 components type. /// Default qualifier 32 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, u32, defaultp> u32vec2; typedef vec<2, u32, defaultp> u32vec2;
@ -571,7 +571,7 @@ namespace glm
/// Default qualifier 64 bit unsigned integer scalar type. /// Default qualifier 64 bit unsigned integer scalar type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, u64, defaultp> u64vec1; typedef vec<1, u64, defaultp> u64vec1;
/// Default qualifier 64 bit unsigned integer vector of 2 components type. /// Default qualifier 64 bit unsigned integer vector of 2 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, u64, defaultp> u64vec2; typedef vec<2, u64, defaultp> u64vec2;
@ -630,7 +630,7 @@ namespace glm
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, float, defaultp> fvec4; typedef vec<4, float, defaultp> fvec4;
/// Single-qualifier floating-point vector of 1 component. /// Single-qualifier floating-point vector of 1 component.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, f32, defaultp> f32vec1; typedef vec<1, f32, defaultp> f32vec1;
@ -667,7 +667,7 @@ namespace glm
////////////////////// //////////////////////
// Float matrix types // Float matrix types
/// Single-qualifier floating-point 1x1 matrix. /// Single-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision

View File

@ -15,7 +15,7 @@
/// takes any of the \ref core_template "core template types". It returns /// takes any of the \ref core_template "core template types". It returns
/// a pointer to the memory layout of the object. Matrix types store their values /// a pointer to the memory layout of the object. Matrix types store their values
/// in column-major order. /// in column-major order.
/// ///
/// This is useful for uploading data to matrices or copying data to buffer objects. /// This is useful for uploading data to matrices or copying data to buffer objects.
/// ///
/// Example: /// Example:
@ -204,7 +204,7 @@ namespace glm
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr); GLM_FUNC_DECL mat<4, 4, T, defaultp> make_mat4x4(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
@ -214,7 +214,7 @@ namespace glm
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>
GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr); GLM_FUNC_DECL mat<3, 3, T, defaultp> make_mat3(T const * const ptr);
/// Build a matrix from a pointer. /// Build a matrix from a pointer.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T> template<typename T>

View File

@ -8,8 +8,8 @@
/// ///
/// Include <glm/gtc/ulp.hpp> to use the features of this extension. /// Include <glm/gtc/ulp.hpp> to use the features of this extension.
/// ///
/// Allow the measurement of the accuracy of a function against a reference /// Allow the measurement of the accuracy of a function against a reference
/// implementation. This extension works on floating-point data and provide results /// implementation. This extension works on floating-point data and provide results
/// in ULP. /// in ULP.
#pragma once #pragma once
@ -48,7 +48,7 @@ namespace glm
/// @see gtc_ulp /// @see gtc_ulp
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance); GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance);
/// Return the distance in the number of ULP between 2 scalars. /// Return the distance in the number of ULP between 2 scalars.
/// @see gtc_ulp /// @see gtc_ulp
template<typename T> template<typename T>
@ -58,7 +58,7 @@ namespace glm
/// @see gtc_ulp /// @see gtc_ulp
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y); GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -79,8 +79,8 @@ namespace detail
ix = hx&0x7fffffff; // |x| ix = hx&0x7fffffff; // |x|
iy = hy&0x7fffffff; // |y| iy = hy&0x7fffffff; // |y|
if((ix>0x7f800000) || // x is nan if((ix>0x7f800000) || // x is nan
(iy>0x7f800000)) // y is nan (iy>0x7f800000)) // y is nan
return x+y; return x+y;
if(compute_equal<float>::call(x, y)) if(compute_equal<float>::call(x, y))
return y; // x=y, return y return y; // x=y, return y
@ -94,7 +94,7 @@ namespace detail
return x; // raise underflow flag return x; // raise underflow flag
} }
if(hx>=0) if(hx>=0)
{ // x > 0 { // x > 0
if(hx>hy) // x > y, x -= ulp if(hx>hy) // x > y, x -= ulp
hx -= 1; hx -= 1;
else // x < y, x += ulp else // x < y, x += ulp
@ -131,8 +131,8 @@ namespace detail
GLM_EXTRACT_WORDS(hx, lx, x); GLM_EXTRACT_WORDS(hx, lx, x);
GLM_EXTRACT_WORDS(hy, ly, y); GLM_EXTRACT_WORDS(hy, ly, y);
ix = hx & 0x7fffffff; // |x| ix = hx & 0x7fffffff; // |x|
iy = hy & 0x7fffffff; // |y| iy = hy & 0x7fffffff; // |y|
if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan
((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan
@ -140,23 +140,23 @@ namespace detail
if(detail::compute_equal<double>::call(x, y)) if(detail::compute_equal<double>::call(x, y))
return y; // x=y, return y return y; // x=y, return y
if((ix|lx)==0) if((ix|lx)==0)
{ // x == 0 { // x == 0
GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal
t = x*x; t = x*x;
if(detail::compute_equal<double>::call(t, x)) if(detail::compute_equal<double>::call(t, x))
return t; return t;
else else
return x; // raise underflow flag return x; // raise underflow flag
} }
if(hx>=0) { // x > 0 if(hx>=0) { // x > 0
if(hx>hy||((hx==hy)&&(lx>ly))) { // x > y, x -= ulp if(hx>hy||((hx==hy)&&(lx>ly))) { // x > y, x -= ulp
if(lx==0) hx -= 1; if(lx==0) hx -= 1;
lx -= 1; lx -= 1;
} else { // x < y, x += ulp } else { // x < y, x += ulp
lx += 1; lx += 1;
if(lx==0) hx += 1; if(lx==0) hx += 1;
} }
} else { // x < 0 } else { // x < 0
if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp
if(lx==0) hx -= 1; if(lx==0) hx -= 1;
lx -= 1; lx -= 1;

View File

@ -7,7 +7,7 @@
/// @ingroup gtc /// @ingroup gtc
/// ///
/// Include <glm/gtc/vec1.hpp> to use the features of this extension. /// Include <glm/gtc/vec1.hpp> to use the features of this extension.
/// ///
/// Add vec1, ivec1, uvec1 and bvec1 types. /// Add vec1, ivec1, uvec1 and bvec1 types.
#pragma once #pragma once
@ -67,7 +67,7 @@ namespace glm
#elif(defined(GLM_PRECISION_LOWP_INT)) #elif(defined(GLM_PRECISION_LOWP_INT))
typedef lowp_ivec1 ivec1; typedef lowp_ivec1 ivec1;
#else #else
/// 1 component vector of signed integer numbers. /// 1 component vector of signed integer numbers.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_ivec1 ivec1; typedef highp_ivec1 ivec1;
#endif//GLM_PRECISION #endif//GLM_PRECISION
@ -79,7 +79,7 @@ namespace glm
#elif(defined(GLM_PRECISION_LOWP_UINT)) #elif(defined(GLM_PRECISION_LOWP_UINT))
typedef lowp_uvec1 uvec1; typedef lowp_uvec1 uvec1;
#else #else
/// 1 component vector of unsigned integer numbers. /// 1 component vector of unsigned integer numbers.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_uvec1 uvec1; typedef highp_uvec1 uvec1;
#endif//GLM_PRECISION #endif//GLM_PRECISION

View File

@ -8,7 +8,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/associated_min_max.hpp> to use the features of this extension. /// Include <glm/gtx/associated_min_max.hpp> to use the features of this extension.
/// ///
/// @brief Min and max functions that return associated values not the compared onces. /// @brief Min and max functions that return associated values not the compared onces.
#pragma once #pragma once

View File

@ -7,7 +7,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/bit.hpp> to use the features of this extension. /// Include <glm/gtx/bit.hpp> to use the features of this extension.
/// ///
/// Allow to perform bit operations on integer values /// Allow to perform bit operations on integer values
#pragma once #pragma once

View File

@ -28,20 +28,20 @@ namespace glm
/// @addtogroup gtx_closest_point /// @addtogroup gtx_closest_point
/// @{ /// @{
/// Find the point on a straight line which is the closet of a point. /// Find the point on a straight line which is the closet of a point.
/// @see gtx_closest_point /// @see gtx_closest_point
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine( GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine(
vec<3, T, Q> const& point, vec<3, T, Q> const& point,
vec<3, T, Q> const& a, vec<3, T, Q> const& a,
vec<3, T, Q> const& b); vec<3, T, Q> const& b);
/// 2d lines work as well /// 2d lines work as well
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine( GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine(
vec<2, T, Q> const& point, vec<2, T, Q> const& point,
vec<2, T, Q> const& a, vec<2, T, Q> const& a,
vec<2, T, Q> const& b); vec<2, T, Q> const& b);
/// @} /// @}
}// namespace glm }// namespace glm

View File

@ -22,7 +22,7 @@ namespace glm
if(Distance >= LineLength) return b; if(Distance >= LineLength) return b;
return a + LineDirection * Distance; return a + LineDirection * Distance;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine
( (
@ -42,5 +42,5 @@ namespace glm
if(Distance >= LineLength) return b; if(Distance >= LineLength) return b;
return a + LineDirection * Distance; return a + LineDirection * Distance;
} }
}//namespace glm }//namespace glm

View File

@ -39,7 +39,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> hsvColor( GLM_FUNC_DECL vec<3, T, Q> hsvColor(
vec<3, T, Q> const& rgbValue); vec<3, T, Q> const& rgbValue);
/// Build a saturation matrix. /// Build a saturation matrix.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T> template<typename T>
@ -52,14 +52,14 @@ namespace glm
GLM_FUNC_DECL vec<3, T, Q> saturation( GLM_FUNC_DECL vec<3, T, Q> saturation(
T const s, T const s,
vec<3, T, Q> const& color); vec<3, T, Q> const& color);
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL vec<4, T, Q> saturation( GLM_FUNC_DECL vec<4, T, Q> saturation(
T const s, T const s,
vec<4, T, Q> const& color); vec<4, T, Q> const& color);
/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T, qualifier Q> template<typename T, qualifier Q>

View File

@ -45,13 +45,13 @@ namespace glm
rgbColor.b = hsv.z; rgbColor.b = hsv.z;
break; break;
case 4: case 4:
rgbColor.r = q; rgbColor.r = q;
rgbColor.g = o; rgbColor.g = o;
rgbColor.b = hsv.z; rgbColor.b = hsv.z;
break; break;
case 5: case 5:
rgbColor.r = hsv.z; rgbColor.r = hsv.z;
rgbColor.g = o; rgbColor.g = o;
rgbColor.b = p; rgbColor.b = p;
break; break;
} }
@ -68,11 +68,11 @@ namespace glm
float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b); float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b);
float Delta = Max - Min; float Delta = Max - Min;
hsv.z = Max; hsv.z = Max;
if(Max != static_cast<T>(0)) if(Max != static_cast<T>(0))
{ {
hsv.y = Delta / hsv.z; hsv.y = Delta / hsv.z;
T h = static_cast<T>(0); T h = static_cast<T>(0);
if(rgbColor.r == Max) if(rgbColor.r == Max)
@ -85,7 +85,7 @@ namespace glm
// between magenta & cyan // between magenta & cyan
h = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; h = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;
if(h < T(0)) if(h < T(0))
hsv.x = h + T(360); hsv.x = h + T(360);
else else
hsv.x = h; hsv.x = h;
@ -133,7 +133,7 @@ namespace glm
return saturation(s) * color; return saturation(s) * color;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, Q>& color) GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, Q>& color)
{ {
const vec<3, T, Q> tmp = vec<3, T, Q>(0.33, 0.59, 0.11); const vec<3, T, Q> tmp = vec<3, T, Q>(0.33, 0.59, 0.11);

View File

@ -34,17 +34,17 @@ namespace glm
/// Returns true if x is a denormalized number /// Returns true if x is a denormalized number
/// Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format. /// Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format.
/// This format is less precise but can represent values closer to zero. /// This format is less precise but can represent values closer to zero.
/// ///
/// @tparam genType Floating-point scalar or vector types. /// @tparam genType Floating-point scalar or vector types.
/// ///
/// @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/sdk/docs/manglsl/xhtml/isnan.xml">GLSL isnan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.3 Common Functions</a>
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x); GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x);
/// Similar to 'mod' but with a different rounding and integer support. /// Similar to 'mod' but with a different rounding and integer support.
/// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)' /// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)'
/// ///
/// @see <a href="http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod">GLSL mod vs HLSL fmod</a> /// @see <a href="http://stackoverflow.com/questions/7610631/glsl-mod-vs-hlsl-fmod">GLSL mod vs HLSL fmod</a>
/// @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/sdk/docs/manglsl/xhtml/mod.xml">GLSL mod man page</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -27,7 +27,7 @@ namespace detail
}; };
}//namespace detail }//namespace detail
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER bool isdenormal(T const& x) GLM_FUNC_QUALIFIER bool isdenormal(T const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isdenormal' only accept floating-point inputs");

View File

@ -2,7 +2,7 @@
/// @file glm/gtx/component_wise.hpp /// @file glm/gtx/component_wise.hpp
/// @date 2007-05-21 / 2011-06-07 /// @date 2007-05-21 / 2011-06-07
/// @author Christophe Riccio /// @author Christophe Riccio
/// ///
/// @see core (dependence) /// @see core (dependence)
/// ///
/// @defgroup gtx_component_wise GLM_GTX_component_wise /// @defgroup gtx_component_wise GLM_GTX_component_wise
@ -43,24 +43,24 @@ namespace glm
template<length_t L, typename T, typename floatType, qualifier Q> template<length_t L, typename T, typename floatType, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> compScale(vec<L, floatType, Q> const& v); GLM_FUNC_DECL vec<L, T, Q> compScale(vec<L, floatType, Q> const& v);
/// Add all vector components together. /// Add all vector components together.
/// @see gtx_component_wise /// @see gtx_component_wise
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::value_type compAdd(genType const& v); GLM_FUNC_DECL typename genType::value_type compAdd(genType const& v);
/// Multiply all vector components together. /// Multiply all vector components together.
/// @see gtx_component_wise /// @see gtx_component_wise
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::value_type compMul(genType const& v); GLM_FUNC_DECL typename genType::value_type compMul(genType const& v);
/// Find the minimum value between single vector components. /// Find the minimum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::value_type compMin(genType const& v); GLM_FUNC_DECL typename genType::value_type compMin(genType const& v);
/// Find the maximum value between single vector components. /// Find the maximum value between single vector components.
/// @see gtx_component_wise /// @see gtx_component_wise
template<typename genType> template<typename genType>
GLM_FUNC_DECL typename genType::value_type compMax(genType const& v); GLM_FUNC_DECL typename genType::value_type compMax(genType const& v);
/// @} /// @}

View File

@ -258,35 +258,35 @@ namespace glm
GLM_FUNC_QUALIFIER mat<3, 4, T, Q> mat3x4_cast(tdualquat<T, Q> const& x) GLM_FUNC_QUALIFIER mat<3, 4, T, Q> mat3x4_cast(tdualquat<T, Q> const& x)
{ {
tquat<T, Q> r = x.real / length2(x.real); tquat<T, Q> r = x.real / length2(x.real);
tquat<T, Q> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z); tquat<T, Q> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z);
r *= static_cast<T>(2); r *= static_cast<T>(2);
T const xy = r.x * x.real.y; T const xy = r.x * x.real.y;
T const xz = r.x * x.real.z; T const xz = r.x * x.real.z;
T const yz = r.y * x.real.z; T const yz = r.y * x.real.z;
T const wx = r.w * x.real.x; T const wx = r.w * x.real.x;
T const wy = r.w * x.real.y; T const wy = r.w * x.real.y;
T const wz = r.w * x.real.z; T const wz = r.w * x.real.z;
vec<4, T, Q> const a( vec<4, T, Q> const a(
rr.w + rr.x - rr.y - rr.z, rr.w + rr.x - rr.y - rr.z,
xy - wz, xy - wz,
xz + wy, xz + wy,
-(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y)); -(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));
vec<4, T, Q> const b( vec<4, T, Q> const b(
xy + wz, xy + wz,
rr.w + rr.y - rr.x - rr.z, rr.w + rr.y - rr.x - rr.z,
yz - wx, yz - wx,
-(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x)); -(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));
vec<4, T, Q> const c( vec<4, T, Q> const c(
xz - wy, xz - wy,
yz + wx, yz + wx,
rr.w + rr.z - rr.x - rr.y, rr.w + rr.z - rr.x - rr.y,
-(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w)); -(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));
return mat<3, 4, T, Q>(a, b, c); return mat<3, 4, T, Q>(a, b, c);
} }
@ -302,7 +302,7 @@ namespace glm
GLM_FUNC_QUALIFIER tdualquat<T, Q> dualquat_cast(mat<3, 4, T, Q> const& x) GLM_FUNC_QUALIFIER tdualquat<T, Q> dualquat_cast(mat<3, 4, T, Q> const& x)
{ {
tquat<T, Q> real; tquat<T, Q> real;
T const trace = x[0].x + x[1].y + x[2].z; T const trace = x[0].x + x[1].y + x[2].z;
if(trace > static_cast<T>(0)) if(trace > static_cast<T>(0))
{ {
@ -340,7 +340,7 @@ namespace glm
real.z = static_cast<T>(0.5) * r; real.z = static_cast<T>(0.5) * r;
real.w = (x[1].x - x[0].y) * invr; real.w = (x[1].x - x[0].y) * invr;
} }
tquat<T, Q> dual; tquat<T, Q> dual;
dual.x = static_cast<T>(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y); dual.x = static_cast<T>(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y);
dual.y = static_cast<T>(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x); dual.y = static_cast<T>(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x);

View File

@ -95,7 +95,7 @@ namespace glm
T const& t1, T const& t1,
T const& t2, T const& t2,
T const& t3); T const& t3);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template<typename T> template<typename T>
@ -103,7 +103,7 @@ namespace glm
T const& yaw, T const& yaw,
T const& pitch, T const& pitch,
T const& roll); T const& roll);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template<typename T> template<typename T>
@ -122,11 +122,11 @@ namespace glm
template<typename T> template<typename T>
GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle); GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle);
/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> orientate3(vec<3, T, Q> const& angles); GLM_FUNC_DECL mat<3, 3, T, Q> orientate3(vec<3, T, Q> const& angles);
/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).
/// @see gtx_euler_angles /// @see gtx_euler_angles
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -139,7 +139,7 @@ namespace glm
T & t1, T & t1,
T & t2, T & t2,
T & t3); T & t3);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -13,7 +13,7 @@ namespace glm
{ {
T cosX = glm::cos(angleX); T cosX = glm::cos(angleX);
T sinX = glm::sin(angleX); T sinX = glm::sin(angleX);
return mat<4, 4, T, defaultp>( return mat<4, 4, T, defaultp>(
T(1), T(0), T(0), T(0), T(1), T(0), T(0), T(0),
T(0), cosX, sinX, T(0), T(0), cosX, sinX, T(0),
@ -130,7 +130,7 @@ namespace glm
{ {
return eulerAngleZ(angleZ) * eulerAngleY(angleY); return eulerAngleZ(angleZ) * eulerAngleY(angleY);
} }
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXYZ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXYZ
( (
@ -145,7 +145,7 @@ namespace glm
T s1 = glm::sin(-t1); T s1 = glm::sin(-t1);
T s2 = glm::sin(-t2); T s2 = glm::sin(-t2);
T s3 = glm::sin(-t3); T s3 = glm::sin(-t3);
mat<4, 4, T, defaultp> Result; mat<4, 4, T, defaultp> Result;
Result[0][0] = c2 * c3; Result[0][0] = c2 * c3;
Result[0][1] =-c1 * s3 + s1 * s2 * c3; Result[0][1] =-c1 * s3 + s1 * s2 * c3;
@ -165,7 +165,7 @@ namespace glm
Result[3][3] = static_cast<T>(1); Result[3][3] = static_cast<T>(1);
return Result; return Result;
} }
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYXZ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYXZ
( (
@ -292,7 +292,7 @@ namespace glm
{ {
return yawPitchRoll(angles.z, angles.x, angles.y); return yawPitchRoll(angles.z, angles.x, angles.y);
} }
template<typename T> template<typename T>
GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M, GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M,
T & t1, T & t1,

View File

@ -30,10 +30,10 @@ namespace glm
/// Extends of Length the Origin position using the (Source - Origin) direction. /// Extends of Length the Origin position using the (Source - Origin) direction.
/// @see gtx_extend /// @see gtx_extend
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType extend( GLM_FUNC_DECL genType extend(
genType const& Origin, genType const& Origin,
genType const& Source, genType const& Source,
typename genType::value_type const Length); typename genType::value_type const Length);
/// @} /// @}

View File

@ -6,8 +6,8 @@ namespace glm
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER genType extend GLM_FUNC_QUALIFIER genType extend
( (
genType const& Origin, genType const& Origin,
genType const& Source, genType const& Source,
genType const& Distance genType const& Distance
) )
{ {

View File

@ -28,112 +28,112 @@ namespace glm
/// @addtogroup gtx_extended_min_max /// @addtogroup gtx_extended_min_max
/// @{ /// @{
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T> template<typename T>
GLM_FUNC_DECL T min( GLM_FUNC_DECL T min(
T const& x, T const& x,
T const& y, T const& y,
T const& z); T const& z);
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z); typename C<T>::T const& z);
/// Return the minimum component-wise values of 3 inputs /// Return the minimum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z); C<T> const& z);
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T> template<typename T>
GLM_FUNC_DECL T min( GLM_FUNC_DECL T min(
T const& x, T const& x,
T const& y, T const& y,
T const& z, T const& z,
T const& w); T const& w);
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z, typename C<T>::T const& z,
typename C<T>::T const& w); typename C<T>::T const& w);
/// Return the minimum component-wise values of 4 inputs /// Return the minimum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> min( GLM_FUNC_DECL C<T> min(
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z, C<T> const& z,
C<T> const& w); C<T> const& w);
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T> template<typename T>
GLM_FUNC_DECL T max( GLM_FUNC_DECL T max(
T const& x, T const& x,
T const& y, T const& y,
T const& z); T const& z);
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z); typename C<T>::T const& z);
/// Return the maximum component-wise values of 3 inputs /// Return the maximum component-wise values of 3 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z); C<T> const& z);
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T> template<typename T>
GLM_FUNC_DECL T max( GLM_FUNC_DECL T max(
T const& x, T const& x,
T const& y, T const& y,
T const& z, T const& z,
T const& w); T const& w);
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z, typename C<T>::T const& z,
typename C<T>::T const& w); typename C<T>::T const& w);
/// Return the maximum component-wise values of 4 inputs /// Return the maximum component-wise values of 4 inputs
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_DECL C<T> max( GLM_FUNC_DECL C<T> max(
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z, C<T> const& z,
C<T> const& w); C<T> const& w);
/// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
/// ///
/// @tparam genType Floating-point or integer; scalar or vector types. /// @tparam genType Floating-point or integer; scalar or vector types.
/// ///
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType fmin(genType x, genType y); GLM_FUNC_DECL genType fmin(genType x, genType y);
@ -161,31 +161,31 @@ namespace glm
GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, vec<L, T, Q> const& y); GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
/// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
/// ///
/// @tparam genType Floating-point; scalar or vector types. /// @tparam genType Floating-point; scalar or vector types.
/// ///
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
/// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType fmax(genType x, genType y); GLM_FUNC_DECL genType fmax(genType x, genType y);
/// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
/// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& x, T y); GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& x, T y);
/// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned. /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
/// ///
/// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @see gtx_extented_min_max /// @see gtx_extented_min_max
/// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a> /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
template<length_t L, typename T, qualifier Q> template<length_t L, typename T, qualifier Q>

View File

@ -5,8 +5,8 @@ namespace glm
{ {
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T min( GLM_FUNC_QUALIFIER T min(
T const& x, T const& x,
T const& y, T const& y,
T const& z) T const& z)
{ {
return glm::min(glm::min(x, y), z); return glm::min(glm::min(x, y), z);
@ -15,8 +15,8 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min GLM_FUNC_QUALIFIER C<T> min
( (
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z typename C<T>::T const& z
) )
{ {
@ -26,8 +26,8 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min GLM_FUNC_QUALIFIER C<T> min
( (
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z C<T> const& z
) )
{ {
@ -37,9 +37,9 @@ namespace glm
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T min GLM_FUNC_QUALIFIER T min
( (
T const& x, T const& x,
T const& y, T const& y,
T const& z, T const& z,
T const& w T const& w
) )
{ {
@ -49,9 +49,9 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min GLM_FUNC_QUALIFIER C<T> min
( (
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z, typename C<T>::T const& z,
typename C<T>::T const& w typename C<T>::T const& w
) )
{ {
@ -61,9 +61,9 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> min GLM_FUNC_QUALIFIER C<T> min
( (
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z, C<T> const& z,
C<T> const& w C<T> const& w
) )
{ {
@ -72,8 +72,8 @@ namespace glm
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T max( GLM_FUNC_QUALIFIER T max(
T const& x, T const& x,
T const& y, T const& y,
T const& z) T const& z)
{ {
return glm::max(glm::max(x, y), z); return glm::max(glm::max(x, y), z);
@ -82,8 +82,8 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max GLM_FUNC_QUALIFIER C<T> max
( (
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z typename C<T>::T const& z
) )
{ {
@ -93,8 +93,8 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max GLM_FUNC_QUALIFIER C<T> max
( (
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z C<T> const& z
) )
{ {
@ -104,9 +104,9 @@ namespace glm
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T max GLM_FUNC_QUALIFIER T max
( (
T const& x, T const& x,
T const& y, T const& y,
T const& z, T const& z,
T const& w T const& w
) )
{ {
@ -116,9 +116,9 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max GLM_FUNC_QUALIFIER C<T> max
( (
C<T> const& x, C<T> const& x,
typename C<T>::T const& y, typename C<T>::T const& y,
typename C<T>::T const& z, typename C<T>::T const& z,
typename C<T>::T const& w typename C<T>::T const& w
) )
{ {
@ -128,9 +128,9 @@ namespace glm
template<typename T, template<typename> class C> template<typename T, template<typename> class C>
GLM_FUNC_QUALIFIER C<T> max GLM_FUNC_QUALIFIER C<T> max
( (
C<T> const& x, C<T> const& x,
C<T> const& y, C<T> const& y,
C<T> const& z, C<T> const& z,
C<T> const& w C<T> const& w
) )
{ {

View File

@ -8,7 +8,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/exterior_product.hpp> to use the features of this extension. /// Include <glm/gtx/exterior_product.hpp> to use the features of this extension.
/// ///
/// @brief Allow to perform bit operations on integer values /// @brief Allow to perform bit operations on integer values
#pragma once #pragma once
@ -30,7 +30,7 @@ namespace glm
/// ///
/// @tparam T Floating-point scalar types /// @tparam T Floating-point scalar types
/// @tparam Q Value from qualifier enum /// @tparam Q Value from qualifier enum
/// ///
/// @see <a href="https://en.wikipedia.org/wiki/Exterior_algebra#Cross_and_triple_products">Exterior product</a> /// @see <a href="https://en.wikipedia.org/wiki/Exterior_algebra#Cross_and_triple_products">Exterior product</a>
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL T cross(vec<2, T, Q> const& v, vec<2, T, Q> const& u); GLM_FUNC_DECL T cross(vec<2, T, Q> const& v, vec<2, T, Q> const& u);

View File

@ -9,7 +9,7 @@
/// Include <glm/gtx/fast_square_root.hpp> to use the features of this extension. /// Include <glm/gtx/fast_square_root.hpp> to use the features of this extension.
/// ///
/// Fast but less accurate implementations of square root based functions. /// Fast but less accurate implementations of square root based functions.
/// - Sqrt optimisation based on Newton's method, /// - Sqrt optimisation based on Newton's method,
/// www.gamedev.net/community/forums/topic.asp?topic id=139956 /// www.gamedev.net/community/forums/topic.asp?topic id=139956
#pragma once #pragma once
@ -35,7 +35,7 @@ namespace glm
/// Faster than the common sqrt function but less accurate. /// Faster than the common sqrt function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType fastSqrt(genType x); GLM_FUNC_DECL genType fastSqrt(genType x);
/// Faster than the common sqrt function but less accurate. /// Faster than the common sqrt function but less accurate.
@ -47,7 +47,7 @@ namespace glm
/// Faster than the common inversesqrt function but less accurate. /// Faster than the common inversesqrt function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType fastInverseSqrt(genType x); GLM_FUNC_DECL genType fastInverseSqrt(genType x);
/// Faster than the common inversesqrt function but less accurate. /// Faster than the common inversesqrt function but less accurate.
@ -83,7 +83,7 @@ namespace glm
/// Faster than the common normalize function but less accurate. /// Faster than the common normalize function but less accurate.
/// ///
/// @see gtx_fast_square_root extension. /// @see gtx_fast_square_root extension.
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType fastNormalize(genType const& x); GLM_FUNC_DECL genType fastNormalize(genType const& x);
/// @} /// @}

View File

@ -30,7 +30,7 @@ namespace glm
/// Wrap an angle to [0 2pi[ /// Wrap an angle to [0 2pi[
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template<typename T> template<typename T>
GLM_FUNC_DECL T wrapAngle(T angle); GLM_FUNC_DECL T wrapAngle(T angle);
/// Faster than the common sin function but less accurate. /// Faster than the common sin function but less accurate.
@ -40,37 +40,37 @@ namespace glm
/// Faster than the common cos function but less accurate. /// Faster than the common cos function but less accurate.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template<typename T> template<typename T>
GLM_FUNC_DECL T fastCos(T angle); GLM_FUNC_DECL T fastCos(T angle);
/// Faster than the common tan function but less accurate. /// Faster than the common tan function but less accurate.
/// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension.
template<typename T>
GLM_FUNC_DECL T fastTan(T angle);
/// Faster than the common asin function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template<typename T> template<typename T>
GLM_FUNC_DECL T fastTan(T angle);
/// Faster than the common asin function but less accurate.
/// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension.
template<typename T>
GLM_FUNC_DECL T fastAsin(T angle); GLM_FUNC_DECL T fastAsin(T angle);
/// Faster than the common acos function but less accurate. /// Faster than the common acos function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template<typename T> template<typename T>
GLM_FUNC_DECL T fastAcos(T angle); GLM_FUNC_DECL T fastAcos(T angle);
/// Faster than the common atan function but less accurate. /// Faster than the common atan function but less accurate.
/// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension.
template<typename T>
GLM_FUNC_DECL T fastAtan(T y, T x);
/// Faster than the common atan function but less accurate.
/// Defined between -2pi and 2pi. /// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension. /// From GLM_GTX_fast_trigonometry extension.
template<typename T> template<typename T>
GLM_FUNC_DECL T fastAtan(T y, T x);
/// Faster than the common atan function but less accurate.
/// Defined between -2pi and 2pi.
/// From GLM_GTX_fast_trigonometry extension.
template<typename T>
GLM_FUNC_DECL T fastAtan(T angle); GLM_FUNC_DECL T fastAtan(T angle);
/// @} /// @}

View File

@ -42,7 +42,7 @@ namespace detail
} }
// cos // cos
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastCos(T x) GLM_FUNC_QUALIFIER T fastCos(T x)
{ {
T const angle(wrapAngle<T>(x)); T const angle(wrapAngle<T>(x));
@ -64,7 +64,7 @@ namespace detail
} }
// sin // sin
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastSin(T x) GLM_FUNC_QUALIFIER T fastSin(T x)
{ {
return fastCos<T>(half_pi<T>() - x); return fastCos<T>(half_pi<T>() - x);
@ -77,7 +77,7 @@ namespace detail
} }
// tan // tan
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastTan(T x) GLM_FUNC_QUALIFIER T fastTan(T x)
{ {
return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));
@ -90,7 +90,7 @@ namespace detail
} }
// asin // asin
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastAsin(T x) GLM_FUNC_QUALIFIER T fastAsin(T x)
{ {
return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));
@ -103,7 +103,7 @@ namespace detail
} }
// acos // acos
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastAcos(T x) GLM_FUNC_QUALIFIER T fastAcos(T x)
{ {
return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)
@ -116,7 +116,7 @@ namespace detail
} }
// atan // atan
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastAtan(T y, T x) GLM_FUNC_QUALIFIER T fastAtan(T y, T x)
{ {
T sgn = sign(y) * sign(x); T sgn = sign(y) * sign(x);
@ -129,7 +129,7 @@ namespace detail
return detail::functor2<L, T, Q>::call(fastAtan, y, x); return detail::functor2<L, T, Q>::call(fastAtan, y, x);
} }
template<typename T> template<typename T>
GLM_FUNC_QUALIFIER T fastAtan(T x) GLM_FUNC_QUALIFIER T fastAtan(T x)
{ {
return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));

View File

@ -1,6 +1,6 @@
/// @ref gtx_functions /// @ref gtx_functions
/// @file glm/gtx/functions.hpp /// @file glm/gtx/functions.hpp
/// ///
/// @see core (dependence) /// @see core (dependence)
/// @see gtc_quaternion (dependence) /// @see gtc_quaternion (dependence)
/// ///
@ -8,7 +8,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/functions.hpp> to use the features of this extension. /// Include <glm/gtx/functions.hpp> to use the features of this extension.
/// ///
/// List of useful common functions. /// List of useful common functions.
#pragma once #pragma once

View File

@ -7,7 +7,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/hash.hpp> to use the features of this extension. /// Include <glm/gtx/hash.hpp> to use the features of this extension.
/// ///
/// Add std::hash support for glm types /// Add std::hash support for glm types
#pragma once #pragma once
@ -121,7 +121,7 @@ namespace std
{ {
GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,Q> const& m) const; GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,Q> const& m) const;
}; };
template<typename T, glm::qualifier Q> template<typename T, glm::qualifier Q>
struct hash<glm::mat<4, 3, T,Q> > struct hash<glm::mat<4, 3, T,Q> >
{ {

View File

@ -29,7 +29,7 @@ namespace glm
/// @addtogroup gtx_integer /// @addtogroup gtx_integer
/// @{ /// @{
//! Returns x raised to the y power. //! Returns x raised to the y power.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL int pow(int x, uint y); GLM_FUNC_DECL int pow(int x, uint y);
@ -47,10 +47,10 @@ namespace glm
//! Return the factorial value of a number (!12 max, integer only) //! Return the factorial value of a number (!12 max, integer only)
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType factorial(genType const& x); GLM_FUNC_DECL genType factorial(genType const& x);
//! 32bit signed integer. //! 32bit signed integer.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
typedef signed int sint; typedef signed int sint;
@ -58,7 +58,7 @@ namespace glm
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint pow(uint x, uint y); GLM_FUNC_DECL uint pow(uint x, uint y);
//! Returns the positive square root of x. //! Returns the positive square root of x.
//! From GLM_GTX_integer extension. //! From GLM_GTX_integer extension.
GLM_FUNC_DECL uint sqrt(uint x); GLM_FUNC_DECL uint sqrt(uint x);

View File

@ -144,7 +144,7 @@ namespace detail
#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) #if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))
GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x)
{ {
return 31u - findMSB(x); return 31u - findMSB(x);
} }
@ -152,7 +152,7 @@ namespace detail
#else #else
// Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt
GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x)
{ {
int y, m, n; int y, m, n;

View File

@ -60,7 +60,7 @@ namespace glm
genType const& vert0, genType const& vert1, genType const& vert2, genType const& vert0, genType const& vert1, genType const& vert2,
genType & position); genType & position);
//! Compute the intersection distance of a ray and a sphere. //! Compute the intersection distance of a ray and a sphere.
//! The ray direction vector is unit length. //! The ray direction vector is unit length.
//! From GLM_GTX_intersect extension. //! From GLM_GTX_intersect extension.
template<typename genType> template<typename genType>
@ -83,7 +83,7 @@ namespace glm
GLM_FUNC_DECL bool intersectLineSphere( GLM_FUNC_DECL bool intersectLineSphere(
genType const& point0, genType const& point1, genType const& point0, genType const& point1,
genType const& sphereCenter, typename genType::value_type sphereRadius, genType const& sphereCenter, typename genType::value_type sphereRadius,
genType & intersectionPosition1, genType & intersectionNormal1, genType & intersectionPosition1, genType & intersectionNormal1,
genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());
/// @} /// @}

View File

@ -200,7 +200,7 @@ namespace glm
( (
genType const& point0, genType const& point1, genType const& point0, genType const& point1,
genType const& sphereCenter, typename genType::value_type sphereRadius, genType const& sphereCenter, typename genType::value_type sphereRadius,
genType & intersectionPoint1, genType & intersectionNormal1, genType & intersectionPoint1, genType & intersectionNormal1,
genType & intersectionPoint2, genType & intersectionNormal2 genType & intersectionPoint2, genType & intersectionNormal2
) )
{ {

View File

@ -10,7 +10,7 @@
/// @ingroup gtx /// @ingroup gtx
/// ///
/// Include <glm/gtx/io.hpp> to use the features of this extension. /// Include <glm/gtx/io.hpp> to use the features of this extension.
/// ///
/// std::[w]ostream support for glm types /// std::[w]ostream support for glm types
/// ///
/// std::[w]ostream support for glm types + qualifier/width/etc. manipulators /// std::[w]ostream support for glm types + qualifier/width/etc. manipulators

View File

@ -3,7 +3,7 @@
namespace glm namespace glm
{ {
template<typename genType> template<typename genType>
GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base)
{ {
assert(!detail::compute_equal<genType>::call(x, static_cast<genType>(0))); assert(!detail::compute_equal<genType>::call(x, static_cast<genType>(0)));

View File

@ -34,7 +34,7 @@ namespace glm
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> matrixCross3( GLM_FUNC_DECL mat<3, 3, T, Q> matrixCross3(
vec<3, T, Q> const& x); vec<3, T, Q> const& x);
//! Build a cross product matrix. //! Build a cross product matrix.
//! From GLM_GTX_matrix_cross_product extension. //! From GLM_GTX_matrix_cross_product extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>

View File

@ -33,7 +33,7 @@ namespace glm
/// @addtogroup gtx_matrix_decompose /// @addtogroup gtx_matrix_decompose
/// @{ /// @{
/// Decomposes a model matrix to translations, rotation and scale components /// Decomposes a model matrix to translations, rotation and scale components
/// @see gtx_matrix_decompose /// @see gtx_matrix_decompose
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL bool decompose( GLM_FUNC_DECL bool decompose(

View File

@ -11,7 +11,7 @@ namespace detail
// result = (a * ascl) + (b * bscl) // result = (a * ascl) + (b * bscl)
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER vec<3, T, Q> combine( GLM_FUNC_QUALIFIER vec<3, T, Q> combine(
vec<3, T, Q> const& a, vec<3, T, Q> const& a,
vec<3, T, Q> const& b, vec<3, T, Q> const& b,
T ascl, T bscl) T ascl, T bscl)
{ {
@ -56,8 +56,8 @@ namespace detail
// First, isolate perspective. This is the messiest. // First, isolate perspective. This is the messiest.
if( if(
epsilonNotEqual(LocalMatrix[0][3], static_cast<T>(0), epsilon<T>()) || epsilonNotEqual(LocalMatrix[0][3], static_cast<T>(0), epsilon<T>()) ||
epsilonNotEqual(LocalMatrix[1][3], static_cast<T>(0), epsilon<T>()) || epsilonNotEqual(LocalMatrix[1][3], static_cast<T>(0), epsilon<T>()) ||
epsilonNotEqual(LocalMatrix[2][3], static_cast<T>(0), epsilon<T>())) epsilonNotEqual(LocalMatrix[2][3], static_cast<T>(0), epsilon<T>()))
{ {
// rightHandSide is the right hand side of the equation. // rightHandSide is the right hand side of the equation.

View File

@ -33,9 +33,9 @@ namespace glm
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<2, 2, T, Q> rowMajor2( GLM_FUNC_DECL mat<2, 2, T, Q> rowMajor2(
vec<2, T, Q> const& v1, vec<2, T, Q> const& v1,
vec<2, T, Q> const& v2); vec<2, T, Q> const& v2);
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -46,8 +46,8 @@ namespace glm
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> rowMajor3( GLM_FUNC_DECL mat<3, 3, T, Q> rowMajor3(
vec<3, T, Q> const& v1, vec<3, T, Q> const& v1,
vec<3, T, Q> const& v2, vec<3, T, Q> const& v2,
vec<3, T, Q> const& v3); vec<3, T, Q> const& v3);
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
@ -60,9 +60,9 @@ namespace glm
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> rowMajor4( GLM_FUNC_DECL mat<4, 4, T, Q> rowMajor4(
vec<4, T, Q> const& v1, vec<4, T, Q> const& v1,
vec<4, T, Q> const& v2, vec<4, T, Q> const& v2,
vec<4, T, Q> const& v3, vec<4, T, Q> const& v3,
vec<4, T, Q> const& v4); vec<4, T, Q> const& v4);
//! Build a row major matrix from other matrix. //! Build a row major matrix from other matrix.
@ -75,9 +75,9 @@ namespace glm
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<2, 2, T, Q> colMajor2( GLM_FUNC_DECL mat<2, 2, T, Q> colMajor2(
vec<2, T, Q> const& v1, vec<2, T, Q> const& v1,
vec<2, T, Q> const& v2); vec<2, T, Q> const& v2);
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -88,28 +88,28 @@ namespace glm
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3( GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3(
vec<3, T, Q> const& v1, vec<3, T, Q> const& v1,
vec<3, T, Q> const& v2, vec<3, T, Q> const& v2,
vec<3, T, Q> const& v3); vec<3, T, Q> const& v3);
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3( GLM_FUNC_DECL mat<3, 3, T, Q> colMajor3(
mat<3, 3, T, Q> const& m); mat<3, 3, T, Q> const& m);
//! Build a column major matrix from column vectors. //! Build a column major matrix from column vectors.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4( GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4(
vec<4, T, Q> const& v1, vec<4, T, Q> const& v1,
vec<4, T, Q> const& v2, vec<4, T, Q> const& v2,
vec<4, T, Q> const& v3, vec<4, T, Q> const& v3,
vec<4, T, Q> const& v4); vec<4, T, Q> const& v4);
//! Build a column major matrix from other matrix. //! Build a column major matrix from other matrix.
//! From GLM_GTX_matrix_major_storage extension. //! From GLM_GTX_matrix_major_storage extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4( GLM_FUNC_DECL mat<4, 4, T, Q> colMajor4(
mat<4, 4, T, Q> const& m); mat<4, 4, T, Q> const& m);

View File

@ -3,10 +3,10 @@
namespace glm namespace glm
{ {
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> rowMajor2 GLM_FUNC_QUALIFIER mat<2, 2, T, Q> rowMajor2
( (
vec<2, T, Q> const& v1, vec<2, T, Q> const& v1,
vec<2, T, Q> const& v2 vec<2, T, Q> const& v2
) )
{ {
@ -18,7 +18,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> rowMajor2( GLM_FUNC_QUALIFIER mat<2, 2, T, Q> rowMajor2(
const mat<2, 2, T, Q>& m) const mat<2, 2, T, Q>& m)
{ {
@ -30,10 +30,10 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rowMajor3( GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rowMajor3(
const vec<3, T, Q>& v1, const vec<3, T, Q>& v1,
const vec<3, T, Q>& v2, const vec<3, T, Q>& v2,
const vec<3, T, Q>& v3) const vec<3, T, Q>& v3)
{ {
mat<3, 3, T, Q> Result; mat<3, 3, T, Q> Result;
@ -49,7 +49,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rowMajor3( GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rowMajor3(
const mat<3, 3, T, Q>& m) const mat<3, 3, T, Q>& m)
{ {
@ -66,11 +66,11 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rowMajor4( GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rowMajor4(
const vec<4, T, Q>& v1, const vec<4, T, Q>& v1,
const vec<4, T, Q>& v2, const vec<4, T, Q>& v2,
const vec<4, T, Q>& v3, const vec<4, T, Q>& v3,
const vec<4, T, Q>& v4) const vec<4, T, Q>& v4)
{ {
mat<4, 4, T, Q> Result; mat<4, 4, T, Q> Result;
@ -93,7 +93,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rowMajor4( GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rowMajor4(
const mat<4, 4, T, Q>& m) const mat<4, 4, T, Q>& m)
{ {
@ -117,48 +117,48 @@ namespace glm
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> colMajor2( GLM_FUNC_QUALIFIER mat<2, 2, T, Q> colMajor2(
const vec<2, T, Q>& v1, const vec<2, T, Q>& v1,
const vec<2, T, Q>& v2) const vec<2, T, Q>& v2)
{ {
return mat<2, 2, T, Q>(v1, v2); return mat<2, 2, T, Q>(v1, v2);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, Q> colMajor2( GLM_FUNC_QUALIFIER mat<2, 2, T, Q> colMajor2(
const mat<2, 2, T, Q>& m) const mat<2, 2, T, Q>& m)
{ {
return mat<2, 2, T, Q>(m); return mat<2, 2, T, Q>(m);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> colMajor3( GLM_FUNC_QUALIFIER mat<3, 3, T, Q> colMajor3(
const vec<3, T, Q>& v1, const vec<3, T, Q>& v1,
const vec<3, T, Q>& v2, const vec<3, T, Q>& v2,
const vec<3, T, Q>& v3) const vec<3, T, Q>& v3)
{ {
return mat<3, 3, T, Q>(v1, v2, v3); return mat<3, 3, T, Q>(v1, v2, v3);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> colMajor3( GLM_FUNC_QUALIFIER mat<3, 3, T, Q> colMajor3(
const mat<3, 3, T, Q>& m) const mat<3, 3, T, Q>& m)
{ {
return mat<3, 3, T, Q>(m); return mat<3, 3, T, Q>(m);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> colMajor4( GLM_FUNC_QUALIFIER mat<4, 4, T, Q> colMajor4(
const vec<4, T, Q>& v1, const vec<4, T, Q>& v1,
const vec<4, T, Q>& v2, const vec<4, T, Q>& v2,
const vec<4, T, Q>& v3, const vec<4, T, Q>& v3,
const vec<4, T, Q>& v4) const vec<4, T, Q>& v4)
{ {
return mat<4, 4, T, Q>(v1, v2, v3, v4); return mat<4, 4, T, Q>(v1, v2, v3, v4);
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> colMajor4( GLM_FUNC_QUALIFIER mat<4, 4, T, Q> colMajor4(
const mat<4, 4, T, Q>& m) const mat<4, 4, T, Q>& m)
{ {

View File

@ -88,7 +88,7 @@ namespace glm
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
Result[3][3] = v[3]; Result[3][3] = v[3];
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -101,7 +101,7 @@ namespace glm
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
Result[2][2] = v[2]; Result[2][2] = v[2];
return Result; return Result;
} }
template<typename T, qualifier Q> template<typename T, qualifier Q>
@ -113,6 +113,6 @@ namespace glm
mat<4, 2, T, Q> Result(static_cast<T>(1)); mat<4, 2, T, Q> Result(static_cast<T>(1));
Result[0][0] = v[0]; Result[0][0] = v[0];
Result[1][1] = v[1]; Result[1][1] = v[1];
return Result; return Result;
} }
}//namespace glm }//namespace glm

View File

@ -35,17 +35,17 @@ namespace glm
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL bool isNull(mat<2, 2, T, Q> const& m, T const& epsilon); GLM_FUNC_DECL bool isNull(mat<2, 2, T, Q> const& m, T const& epsilon);
/// Return whether a matrix a null matrix. /// Return whether a matrix a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL bool isNull(mat<3, 3, T, Q> const& m, T const& epsilon); GLM_FUNC_DECL bool isNull(mat<3, 3, T, Q> const& m, T const& epsilon);
/// Return whether a matrix is a null matrix. /// Return whether a matrix is a null matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<typename T, qualifier Q> template<typename T, qualifier Q>
GLM_FUNC_DECL bool isNull(mat<4, 4, T, Q> const& m, T const& epsilon); GLM_FUNC_DECL bool isNull(mat<4, 4, T, Q> const& m, T const& epsilon);
/// Return whether a matrix is an identity matrix. /// Return whether a matrix is an identity matrix.
/// From GLM_GTX_matrix_query extension. /// From GLM_GTX_matrix_query extension.
template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType> template<length_t C, length_t R, typename T, qualifier Q, template<length_t, length_t, typename, qualifier> class matType>

Some files were not shown because too many files have changed in this diff Show More