Renamed precision enum to qualifier

This commit is contained in:
Christophe Riccio 2017-08-15 21:23:47 +02:00
parent a7b72ec5b2
commit a805fb9d68
201 changed files with 5026 additions and 5127 deletions

View File

@ -23,19 +23,19 @@ 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> permute(vec<2, T, P> const & x) GLM_FUNC_QUALIFIER vec<2, T, P> permute(vec<2, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> permute(vec<3, T, P> const & x) GLM_FUNC_QUALIFIER vec<3, T, P> permute(vec<3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> permute(vec<4, T, P> const & x) GLM_FUNC_QUALIFIER vec<4, T, P> permute(vec<4, T, P> 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);
@ -47,37 +47,37 @@ namespace detail
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> taylorInvSqrt(vec<2, T, P> const & r) GLM_FUNC_QUALIFIER vec<2, T, P> taylorInvSqrt(vec<2, T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> taylorInvSqrt(vec<3, T, P> const & r) GLM_FUNC_QUALIFIER vec<3, T, P> taylorInvSqrt(vec<3, T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> taylorInvSqrt(vec<4, T, P> const & r) GLM_FUNC_QUALIFIER vec<4, T, P> taylorInvSqrt(vec<4, T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> fade(vec<2, T, P> const & t) GLM_FUNC_QUALIFIER vec<2, T, P> fade(vec<2, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> fade(vec<3, T, P> const & t) GLM_FUNC_QUALIFIER vec<3, T, P> fade(vec<3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> fade(vec<4, T, P> const & t) GLM_FUNC_QUALIFIER vec<4, T, P> fade(vec<4, T, P> 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));

View File

@ -20,24 +20,24 @@ namespace detail
char _buffer[1]; char _buffer[1];
}; };
template<int N, typename T, precision P, int E0, int E1, int E2, int E3, bool Aligned> template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3, bool Aligned>
struct _swizzle_base1 : public _swizzle_base0<T, N> struct _swizzle_base1 : public _swizzle_base0<T, N>
{ {
}; };
template<typename T, precision P, int E0, int E1, bool Aligned> template<typename T, qualifier P, int E0, int E1, bool Aligned>
struct _swizzle_base1<2, T, P, E0,E1,-1,-2, Aligned> : public _swizzle_base0<T, 2> struct _swizzle_base1<2, T, P, E0,E1,-1,-2, Aligned> : public _swizzle_base0<T, 2>
{ {
GLM_FUNC_QUALIFIER vec<2, T, P> operator ()() const { return vec<2, T, P>(this->elem(E0), this->elem(E1)); } GLM_FUNC_QUALIFIER vec<2, T, P> operator ()() const { return vec<2, T, P>(this->elem(E0), this->elem(E1)); }
}; };
template<typename T, precision P, int E0, int E1, int E2, bool Aligned> template<typename T, qualifier P, int E0, int E1, int E2, bool Aligned>
struct _swizzle_base1<3, T, P, E0,E1,E2,-1, Aligned> : public _swizzle_base0<T, 3> struct _swizzle_base1<3, T, P, E0,E1,E2,-1, Aligned> : public _swizzle_base0<T, 3>
{ {
GLM_FUNC_QUALIFIER vec<3, T, P> operator ()() const { return vec<3, T, P>(this->elem(E0), this->elem(E1), this->elem(E2)); } GLM_FUNC_QUALIFIER vec<3, T, P> operator ()() const { return vec<3, T, P>(this->elem(E0), this->elem(E1), this->elem(E2)); }
}; };
template<typename T, precision P, int E0, int E1, int E2, int E3, bool Aligned> template<typename T, qualifier P, int E0, int E1, int E2, int E3, bool Aligned>
struct _swizzle_base1<4, T, P, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4> struct _swizzle_base1<4, T, P, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, T, P> operator ()() const { return vec<4, T, P>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } GLM_FUNC_QUALIFIER vec<4, T, P> operator ()() const { return vec<4, T, P>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }
@ -54,7 +54,7 @@ namespace detail
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, precision P, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS> template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
struct _swizzle_base2 : public _swizzle_base1<N, T, P, E0,E1,E2,E3, detail::is_aligned<P>::value> struct _swizzle_base2 : public _swizzle_base1<N, T, P, E0,E1,E2,E3, detail::is_aligned<P>::value>
{ {
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const T& t) GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const T& t)
@ -132,7 +132,7 @@ namespace detail
}; };
// Specialization for swizzles containing duplicate elements. These cannot be modified. // Specialization for swizzles containing duplicate elements. These cannot be modified.
template<int N, typename T, precision P, int E0, int E1, int E2, int E3> template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3>
struct _swizzle_base2<N, T, P, E0,E1,E2,E3, 1> : public _swizzle_base1<N, T, P, E0,E1,E2,E3, detail::is_aligned<P>::value> struct _swizzle_base2<N, T, P, E0,E1,E2,E3, 1> : public _swizzle_base1<N, T, P, E0,E1,E2,E3, detail::is_aligned<P>::value>
{ {
struct Stub {}; struct Stub {};
@ -146,7 +146,7 @@ namespace detail
} }
}; };
template<int N, typename T, precision P, int E0, int E1, int E2, int E3> template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3>
struct _swizzle : public _swizzle_base2<N, T, P, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> struct _swizzle : public _swizzle_base2<N, T, P, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)>
{ {
typedef _swizzle_base2<N, T, P, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> base_type; typedef _swizzle_base2<N, T, P, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> base_type;
@ -159,8 +159,8 @@ namespace detail
// //
// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros // To prevent the C++ syntax from getting entirely overwhelming, define some alias macros
// //
#define GLM_SWIZZLE_TEMPLATE1 template<int N, typename T, precision P, int E0, int E1, int E2, int E3> #define GLM_SWIZZLE_TEMPLATE1 template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3>
#define GLM_SWIZZLE_TEMPLATE2 template<int N, typename T, precision P, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3> #define GLM_SWIZZLE_TEMPLATE2 template<int N, typename T, qualifier P, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>
#define GLM_SWIZZLE_TYPE1 _swizzle<N, T, P, E0, E1, E2, E3> #define GLM_SWIZZLE_TYPE1 _swizzle<N, T, P, E0, E1, E2, E3>
#define GLM_SWIZZLE_TYPE2 _swizzle<N, T, P, F0, F1, F2, F3> #define GLM_SWIZZLE_TYPE2 _swizzle<N, T, P, F0, F1, F2, F3>

View File

@ -11,10 +11,10 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t L, typename R, typename T, precision P> template<length_t L, typename R, typename T, qualifier P>
struct functor1{}; struct functor1{};
template<typename R, typename T, precision P> template<typename R, typename T, qualifier P>
struct functor1<1, R, T, P> struct functor1<1, R, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<1, R, P> call(R (*Func) (T x), vec<1, T, P> const & v) GLM_FUNC_QUALIFIER static vec<1, R, P> call(R (*Func) (T x), vec<1, T, P> const & v)
@ -23,7 +23,7 @@ namespace detail
} }
}; };
template<typename R, typename T, precision P> template<typename R, typename T, qualifier P>
struct functor1<2, R, T, P> struct functor1<2, R, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<2, R, P> call(R (*Func) (T x), vec<2, T, P> const & v) GLM_FUNC_QUALIFIER static vec<2, R, P> call(R (*Func) (T x), vec<2, T, P> const & v)
@ -32,7 +32,7 @@ namespace detail
} }
}; };
template<typename R, typename T, precision P> template<typename R, typename T, qualifier P>
struct functor1<3, R, T, P> struct functor1<3, R, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<3, R, P> call(R (*Func) (T x), vec<3, T, P> const & v) GLM_FUNC_QUALIFIER static vec<3, R, P> call(R (*Func) (T x), vec<3, T, P> const & v)
@ -41,7 +41,7 @@ namespace detail
} }
}; };
template<typename R, typename T, precision P> template<typename R, typename T, qualifier P>
struct functor1<4, R, T, P> struct functor1<4, R, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, R, P> call(R (*Func) (T x), vec<4, T, P> const & v) GLM_FUNC_QUALIFIER static vec<4, R, P> call(R (*Func) (T x), vec<4, T, P> const & v)
@ -50,10 +50,10 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct functor2{}; struct functor2{};
template<typename T, precision P> template<typename T, qualifier P>
struct functor2<1, T, P> struct functor2<1, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, vec<1, T, P> const & b) GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, vec<1, T, P> const & b)
@ -62,7 +62,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2<2, T, P> struct functor2<2, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, vec<2, T, P> const & b) GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, vec<2, T, P> const & b)
@ -71,7 +71,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2<3, T, P> struct functor2<3, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, vec<3, T, P> const & b) GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, vec<3, T, P> const & b)
@ -80,7 +80,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2<4, T, P> struct functor2<4, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -89,10 +89,10 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct functor2_vec_sca{}; struct functor2_vec_sca{};
template<typename T, precision P> template<typename T, qualifier P>
struct functor2_vec_sca<1, T, P> struct functor2_vec_sca<1, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, T b) GLM_FUNC_QUALIFIER static vec<1, T, P> call(T (*Func) (T x, T y), vec<1, T, P> const & a, T b)
@ -101,7 +101,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2_vec_sca<2, T, P> struct functor2_vec_sca<2, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, T b) GLM_FUNC_QUALIFIER static vec<2, T, P> call(T (*Func) (T x, T y), vec<2, T, P> const & a, T b)
@ -110,7 +110,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2_vec_sca<3, T, P> struct functor2_vec_sca<3, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, T b) GLM_FUNC_QUALIFIER static vec<3, T, P> call(T (*Func) (T x, T y), vec<3, T, P> const & a, T b)
@ -119,7 +119,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct functor2_vec_sca<4, T, P> struct functor2_vec_sca<4, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, T b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(T (*Func) (T x, T y), vec<4, T, P> const & a, T b)

View File

@ -11,7 +11,7 @@
#pragma once #pragma once
#include "setup.hpp" #include "setup.hpp"
#include "precision.hpp" #include "qualifier.hpp"
#include "type_int.hpp" #include "type_int.hpp"
#include "_fixes.hpp" #include "_fixes.hpp"
@ -26,7 +26,7 @@ namespace glm
/// ///
/// @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 precision /// @see qualifier
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType abs(genType x); GLM_FUNC_DECL genType abs(genType x);
@ -34,33 +34,33 @@ 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> abs(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> abs(vec<L, T, P> 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
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml">GLSL sign 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> sign(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> sign(vec<L, T, P> 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
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml">GLSL floor 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> floor(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> floor(vec<L, T, P> const& x);
/// Returns a value equal to the nearest integer to x /// Returns a value equal to the nearest integer to x
@ -68,11 +68,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml">GLSL trunc 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> trunc(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> trunc(vec<L, T, P> const& x);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
@ -83,11 +83,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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 <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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> round(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> round(vec<L, T, P> const& x);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
@ -96,12 +96,12 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml">GLSL roundEven 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 <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a> /// @see <a href="http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx">New round to even technique</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> roundEven(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> roundEven(vec<L, T, P> const& x);
/// Returns a value equal to the nearest integer /// Returns a value equal to the nearest integer
@ -109,11 +109,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml">GLSL ceil 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> ceil(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> ceil(vec<L, T, P> const& x);
/// Return x - floor(x). /// Return x - floor(x).
@ -129,11 +129,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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>
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> fract(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> fract(vec<L, T, P> const& x);
/// Modulus. Returns x - y * floor(x / y) /// Modulus. Returns x - y * floor(x / y)
@ -151,11 +151,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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>
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, T y); GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, T y);
/// Modulus. Returns x - y * floor(x / y) /// Modulus. Returns x - y * floor(x / y)
@ -163,11 +163,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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>
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the fractional part of x and sets i to the integer /// Returns the fractional part of x and sets i to the integer
@ -195,22 +195,22 @@ 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 integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> min(vec<L, T, P> const& x, T y); GLM_FUNC_DECL vec<L, T, P> min(vec<L, T, P> const& x, T y);
/// Returns y if y < x; otherwise, it returns x. /// Returns y if y < x; 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 P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> min(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, T, P> min(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns y if x < y; otherwise, it returns x. /// Returns y if x < y; otherwise, it returns x.
@ -226,22 +226,22 @@ 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 integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> max(vec<L, T, P> const& x, T y); GLM_FUNC_DECL vec<L, T, P> max(vec<L, T, P> 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> max(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, T, P> max(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns min(max(x, minVal), maxVal) for each component in x /// Returns min(max(x, minVal), maxVal) for each component in x
@ -259,11 +259,11 @@ 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 integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> clamp(vec<L, T, P> const & x, T minVal, T maxVal); GLM_FUNC_DECL vec<L, T, P> clamp(vec<L, T, P> 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
@ -271,11 +271,11 @@ 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 integer scalar types /// @tparam T Floating-point or integer scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml">GLSL clamp 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> clamp(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal); GLM_FUNC_DECL vec<L, T, P> clamp(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal);
/// If genTypeU is a floating scalar or vector: /// If genTypeU is a floating scalar or vector:
@ -323,10 +323,10 @@ namespace glm
template<typename genTypeT, typename genTypeU> template<typename genTypeT, typename genTypeU>
GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a); GLM_FUNC_DECL genTypeT mix(genTypeT x, genTypeT y, genTypeU a);
template<length_t L, typename T, typename U, precision P> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a); GLM_FUNC_DECL vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a);
template<length_t L, typename T, typename U, precision P> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, U a); GLM_FUNC_DECL vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> 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.
@ -340,22 +340,22 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> step(T edge, vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> step(T edge, vec<L, T, P> 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> step(vec<L, T, P> const& edge, vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> step(vec<L, T, P> const& edge, vec<L, T, P> const& x);
/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and
@ -375,10 +375,10 @@ namespace glm
template<typename genType> template<typename genType>
GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x); GLM_FUNC_DECL genType smoothstep(genType edge0, genType edge1, genType x);
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> smoothstep(T edge0, T edge1, vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> smoothstep(T edge0, T edge1, vec<L, T, P> const& x);
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> smoothstep(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> smoothstep(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x);
/// Returns true if x holds a NaN (not a number) /// Returns true if x holds a NaN (not a number)
@ -391,11 +391,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> isnan(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, bool, P> isnan(vec<L, T, P> const& x);
/// Returns true if x holds a positive infinity or negative /// Returns true if x holds a positive infinity or negative
@ -406,11 +406,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Value from precision enum /// @tparam P 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> isinf(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, bool, P> isinf(vec<L, T, P> const& x);
/// Returns a signed integer value representing /// Returns a signed integer value representing
@ -426,11 +426,11 @@ namespace glm
/// 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, int, P> floatBitsToInt(vec<L, float, P> const& v); GLM_FUNC_DECL vec<L, int, P> floatBitsToInt(vec<L, float, P> const& v);
/// Returns a unsigned integer value representing /// Returns a unsigned integer value representing
@ -446,11 +446,11 @@ namespace glm
/// 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 P Value from precision enum /// @tparam P Value from qualifier enum
/// ///
/// @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>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, uint, P> floatBitsToUint(vec<L, float, P> const& v); GLM_FUNC_DECL vec<L, uint, P> floatBitsToUint(vec<L, float, P> const& v);
/// Returns a floating-point value corresponding to a signed /// Returns a floating-point value corresponding to a signed
@ -470,11 +470,11 @@ namespace glm
/// 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, float, P> intBitsToFloat(vec<L, int, P> const& v); GLM_FUNC_DECL vec<L, float, P> intBitsToFloat(vec<L, int, P> const& v);
/// Returns a floating-point value corresponding to a /// Returns a floating-point value corresponding to a
@ -494,11 +494,11 @@ namespace glm
/// 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 P Value from precision enum /// @tparam P 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, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, float, P> uintBitsToFloat(vec<L, uint, P> const& v); GLM_FUNC_DECL vec<L, float, P> uintBitsToFloat(vec<L, uint, P> const& v);
/// Computes and returns a * b + c. /// Computes and returns a * b + c.

View File

@ -107,7 +107,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_abs_vector struct compute_abs_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const & x)
@ -116,7 +116,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, typename U, precision P, bool Aligned> template<length_t L, typename T, typename U, qualifier P, bool Aligned>
struct compute_mix_vector struct compute_mix_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a)
@ -127,7 +127,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_mix_vector<L, T, bool, P, Aligned> struct compute_mix_vector<L, T, bool, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, bool, P> const& a) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, bool, P> const& a)
@ -139,7 +139,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, typename U, precision P, bool Aligned> template<length_t L, typename T, typename U, qualifier P, bool Aligned>
struct compute_mix_scalar struct compute_mix_scalar
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, U const& a) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, U const& a)
@ -150,7 +150,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_mix_scalar<L, T, bool, P, Aligned> struct compute_mix_scalar<L, T, bool, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, bool const& a) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y, bool const& a)
@ -179,7 +179,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool isFloat, bool Aligned> template<length_t L, typename T, qualifier P, bool isFloat, bool Aligned>
struct compute_sign struct compute_sign
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -189,7 +189,7 @@ namespace detail
}; };
# if GLM_ARCH == GLM_ARCH_X86 # if GLM_ARCH == GLM_ARCH_X86
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_sign<L, T, P, false, Aligned> struct compute_sign<L, T, P, false, Aligned>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -202,7 +202,7 @@ namespace detail
}; };
# endif # endif
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_floor struct compute_floor
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -211,7 +211,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_ceil struct compute_ceil
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -220,7 +220,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_fract struct compute_fract
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -229,7 +229,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_trunc struct compute_trunc
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -238,7 +238,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_round struct compute_round
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -247,7 +247,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_mod struct compute_mod
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& a, vec<L, T, P> const& b) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& a, vec<L, T, P> const& b)
@ -257,7 +257,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_min_vector struct compute_min_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y)
@ -266,7 +266,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_max_vector struct compute_max_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& y)
@ -275,7 +275,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_clamp_vector struct compute_clamp_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal)
@ -284,7 +284,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_step_vector struct compute_step_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& edge, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& edge, vec<L, T, P> const& x)
@ -293,7 +293,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_smoothstep_vector struct compute_smoothstep_vector
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x)
@ -311,7 +311,7 @@ namespace detail
return detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x); return detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> abs(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> abs(vec<L, T, P> const & x)
{ {
return detail::compute_abs_vector<L, T, P, detail::is_aligned<P>::value>::call(x); return detail::compute_abs_vector<L, T, P, detail::is_aligned<P>::value>::call(x);
@ -329,7 +329,7 @@ namespace detail
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;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> sign(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> sign(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT( GLM_STATIC_ASSERT(
@ -341,21 +341,21 @@ namespace detail
// floor // floor
using ::std::floor; using ::std::floor;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> floor(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> floor(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'floor' only accept floating-point inputs."); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'floor' only accept floating-point inputs.");
return detail::compute_floor<L, T, P, detail::is_aligned<P>::value>::call(x); return detail::compute_floor<L, T, P, detail::is_aligned<P>::value>::call(x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> trunc(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> trunc(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'trunc' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'trunc' only accept floating-point inputs");
return detail::compute_trunc<L, T, P, detail::is_aligned<P>::value>::call(x); return detail::compute_trunc<L, T, P, detail::is_aligned<P>::value>::call(x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> round(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> round(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'round' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'round' only accept floating-point inputs");
@ -405,7 +405,7 @@ namespace detail
//} //}
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> roundEven(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> roundEven(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'roundEven' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'roundEven' only accept floating-point inputs");
@ -414,7 +414,7 @@ namespace detail
// ceil // ceil
using ::std::ceil; using ::std::ceil;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> ceil(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> ceil(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ceil' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ceil' only accept floating-point inputs");
@ -428,7 +428,7 @@ namespace detail
return fract(vec<1, genType>(x)).x; return fract(vec<1, genType>(x)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> fract(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> fract(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fract' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fract' only accept floating-point inputs");
@ -448,13 +448,13 @@ namespace detail
# endif # endif
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> mod(vec<L, T, P> const & x, T y) GLM_FUNC_QUALIFIER vec<L, T, P> mod(vec<L, T, P> const & x, T y)
{ {
return detail::compute_mod<L, T, P, detail::is_aligned<P>::value>::call(x, vec<L, T, P>(y)); return detail::compute_mod<L, T, P, detail::is_aligned<P>::value>::call(x, vec<L, T, P>(y));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
return detail::compute_mod<L, T, P, detail::is_aligned<P>::value>::call(x, y); return detail::compute_mod<L, T, P, detail::is_aligned<P>::value>::call(x, y);
@ -468,14 +468,14 @@ namespace detail
return std::modf(x, &i); return std::modf(x, &i);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> modf(vec<1, T, P> const & x, vec<1, T, P> & i) GLM_FUNC_QUALIFIER vec<1, T, P> modf(vec<1, T, P> const & x, vec<1, T, P> & i)
{ {
return vec<1, T, P>( return vec<1, T, P>(
modf(x.x, i.x)); modf(x.x, i.x));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> modf(vec<2, T, P> const & x, vec<2, T, P> & i) GLM_FUNC_QUALIFIER vec<2, T, P> modf(vec<2, T, P> const & x, vec<2, T, P> & i)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -483,7 +483,7 @@ namespace detail
modf(x.y, i.y)); modf(x.y, i.y));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> modf(vec<3, T, P> const & x, vec<3, T, P> & i) GLM_FUNC_QUALIFIER vec<3, T, P> modf(vec<3, T, P> const & x, vec<3, T, P> & i)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -492,7 +492,7 @@ namespace detail
modf(x.z, i.z)); modf(x.z, i.z));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> modf(vec<4, T, P> const & x, vec<4, T, P> & i) GLM_FUNC_QUALIFIER vec<4, T, P> modf(vec<4, T, P> const & x, vec<4, T, P> & i)
{ {
return vec<4, T, P>( return vec<4, T, P>(
@ -511,28 +511,28 @@ namespace detail
//CHAR_BIT - 1))); //CHAR_BIT - 1)));
// min // min
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> min(vec<L, T, P> const & a, T b) GLM_FUNC_QUALIFIER vec<L, T, P> min(vec<L, T, P> const & a, T b)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point or integer inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point or integer inputs");
return detail::compute_min_vector<L, T, P, detail::is_aligned<P>::value>::call(a, vec<L, T, P>(b)); return detail::compute_min_vector<L, T, P, detail::is_aligned<P>::value>::call(a, vec<L, T, P>(b));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> min(vec<L, T, P> const& a, vec<L, T, P> const& b) GLM_FUNC_QUALIFIER vec<L, T, P> min(vec<L, T, P> const& a, vec<L, T, P> const& b)
{ {
return detail::compute_min_vector<L, T, P, detail::is_aligned<P>::value>::call(a, b); return detail::compute_min_vector<L, T, P, detail::is_aligned<P>::value>::call(a, b);
} }
// max // max
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> max(vec<L, T, P> const& a, T b) GLM_FUNC_QUALIFIER vec<L, T, P> max(vec<L, T, P> const& a, T b)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'max' only accept floating-point or integer inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'max' only accept floating-point or integer inputs");
return detail::compute_max_vector<L, T, P, detail::is_aligned<P>::value>::call(a, vec<L, T, P>(b)); return detail::compute_max_vector<L, T, P, detail::is_aligned<P>::value>::call(a, vec<L, T, P>(b));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> max(vec<L, T, P> const& a, vec<L, T, P> const & b) GLM_FUNC_QUALIFIER vec<L, T, P> max(vec<L, T, P> const& a, vec<L, T, P> const & b)
{ {
return detail::compute_max_vector<L, T, P, detail::is_aligned<P>::value>::call(a, b); return detail::compute_max_vector<L, T, P, detail::is_aligned<P>::value>::call(a, b);
@ -546,14 +546,14 @@ namespace detail
return min(max(x, minVal), maxVal); return min(max(x, minVal), maxVal);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> clamp(vec<L, T, P> const & x, T minVal, T maxVal) GLM_FUNC_QUALIFIER vec<L, T, P> clamp(vec<L, T, P> const & x, T minVal, T maxVal)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs");
return detail::compute_clamp_vector<L, T, P, detail::is_aligned<P>::value>::call(x, vec<L, T, P>(minVal), vec<L, T, P>(maxVal)); return detail::compute_clamp_vector<L, T, P, detail::is_aligned<P>::value>::call(x, vec<L, T, P>(minVal), vec<L, T, P>(maxVal));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> clamp(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal) GLM_FUNC_QUALIFIER vec<L, T, P> clamp(vec<L, T, P> const& x, vec<L, T, P> const& minVal, vec<L, T, P> const& maxVal)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs");
@ -566,13 +566,13 @@ namespace detail
return detail::compute_mix<genTypeT, genTypeU>::call(x, y, a); return detail::compute_mix<genTypeT, genTypeU>::call(x, y, a);
} }
template<length_t L, typename T, typename U, precision P> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, U a) GLM_FUNC_QUALIFIER vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, U a)
{ {
return detail::compute_mix_scalar<L, T, U, P, detail::is_aligned<P>::value>::call(x, y, a); return detail::compute_mix_scalar<L, T, U, P, detail::is_aligned<P>::value>::call(x, y, a);
} }
template<length_t L, typename T, typename U, precision P> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a) GLM_FUNC_QUALIFIER vec<L, T, P> mix(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, U, P> const& a)
{ {
return detail::compute_mix_vector<L, T, U, P, detail::is_aligned<P>::value>::call(x, y, a); return detail::compute_mix_vector<L, T, U, P, detail::is_aligned<P>::value>::call(x, y, a);
@ -585,13 +585,13 @@ namespace detail
return mix(static_cast<genType>(1), static_cast<genType>(0), glm::lessThan(x, edge)); return mix(static_cast<genType>(1), static_cast<genType>(0), glm::lessThan(x, edge));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> step(T edge, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> step(T edge, vec<L, T, P> const& x)
{ {
return detail::compute_step_vector<L, T, P, detail::is_aligned<P>::value>::call(vec<L, T, P>(edge), x); return detail::compute_step_vector<L, T, P, detail::is_aligned<P>::value>::call(vec<L, T, P>(edge), x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> step(vec<L, T, P> const& edge, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> step(vec<L, T, P> const& edge, vec<L, T, P> const& x)
{ {
return detail::compute_step_vector<L, T, P, detail::is_aligned<P>::value>::call(edge, x); return detail::compute_step_vector<L, T, P, detail::is_aligned<P>::value>::call(edge, x);
@ -607,13 +607,13 @@ namespace detail
return tmp * tmp * (genType(3) - genType(2) * tmp); return tmp * tmp * (genType(3) - genType(2) * tmp);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> smoothstep(T edge0, T edge1, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> smoothstep(T edge0, T edge1, vec<L, T, P> const& x)
{ {
return detail::compute_smoothstep_vector<L, T, P, detail::is_aligned<P>::value>::call(vec<L, T, P>(edge0), vec<L, T, P>(edge1), x); return detail::compute_smoothstep_vector<L, T, P, detail::is_aligned<P>::value>::call(vec<L, T, P>(edge0), vec<L, T, P>(edge1), x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> smoothstep(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> smoothstep(vec<L, T, P> const& edge0, vec<L, T, P> const& edge1, vec<L, T, P> const& x)
{ {
return detail::compute_smoothstep_vector<L, T, P, detail::is_aligned<P>::value>::call(edge0, edge1, x); return detail::compute_smoothstep_vector<L, T, P, detail::is_aligned<P>::value>::call(edge0, edge1, x);
@ -647,7 +647,7 @@ namespace detail
} }
# endif # endif
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> isnan(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, bool, P> isnan(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
@ -686,7 +686,7 @@ namespace detail
} }
# endif # endif
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> isinf(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, bool, P> isinf(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
@ -707,7 +707,7 @@ namespace detail
return u.out; return u.out;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, int, P> floatBitsToInt(vec<L, float, P> const& v) GLM_FUNC_QUALIFIER vec<L, int, P> floatBitsToInt(vec<L, float, P> const& v)
{ {
return reinterpret_cast<vec<L, int, P>&>(const_cast<vec<L, float, P>&>(v)); return reinterpret_cast<vec<L, int, P>&>(const_cast<vec<L, float, P>&>(v));
@ -726,7 +726,7 @@ namespace detail
return u.out; return u.out;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, uint, P> floatBitsToUint(vec<L, float, P> const& v) GLM_FUNC_QUALIFIER vec<L, uint, P> floatBitsToUint(vec<L, float, P> const& v)
{ {
return reinterpret_cast<vec<L, uint, P>&>(const_cast<vec<L, float, P>&>(v)); return reinterpret_cast<vec<L, uint, P>&>(const_cast<vec<L, float, P>&>(v));
@ -745,7 +745,7 @@ namespace detail
return u.out; return u.out;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, float, P> intBitsToFloat(vec<L, int, P> const& v) GLM_FUNC_QUALIFIER vec<L, float, P> intBitsToFloat(vec<L, int, P> const& v)
{ {
return reinterpret_cast<vec<L, float, P>&>(const_cast<vec<L, int, P>&>(v)); return reinterpret_cast<vec<L, float, P>&>(const_cast<vec<L, int, P>&>(v));
@ -764,7 +764,7 @@ namespace detail
return u.out; return u.out;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, float, P> uintBitsToFloat(vec<L, uint, P> const& v) GLM_FUNC_QUALIFIER vec<L, float, P> uintBitsToFloat(vec<L, uint, P> const& v)
{ {
return reinterpret_cast<vec<L, float, P>&>(const_cast<vec<L, uint, P>&>(v)); return reinterpret_cast<vec<L, float, P>&>(const_cast<vec<L, uint, P>&>(v));
@ -784,7 +784,7 @@ namespace detail
return std::frexp(x, &exp); return std::frexp(x, &exp);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> frexp(vec<1, T, P> const& x, vec<1, int, P>& exp) GLM_FUNC_QUALIFIER vec<1, T, P> frexp(vec<1, T, P> const& x, vec<1, int, P>& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
@ -792,7 +792,7 @@ namespace detail
return vec<1, T, P>(std::frexp(x.x, &exp.x)); return vec<1, T, P>(std::frexp(x.x, &exp.x));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> frexp(vec<2, T, P> const& x, vec<2, int, P>& exp) GLM_FUNC_QUALIFIER vec<2, T, P> frexp(vec<2, T, P> const& x, vec<2, int, P>& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
@ -802,7 +802,7 @@ namespace detail
frexp(x.y, exp.y)); frexp(x.y, exp.y));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> frexp(vec<3, T, P> const& x, vec<3, int, P>& exp) GLM_FUNC_QUALIFIER vec<3, T, P> frexp(vec<3, T, P> const& x, vec<3, int, P>& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
@ -813,7 +813,7 @@ namespace detail
frexp(x.z, exp.z)); frexp(x.z, exp.z));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> frexp(vec<4, T, P> const& x, vec<4, int, P>& exp) GLM_FUNC_QUALIFIER vec<4, T, P> frexp(vec<4, T, P> const& x, vec<4, int, P>& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'frexp' only accept floating-point inputs");
@ -833,7 +833,7 @@ namespace detail
return std::ldexp(x, exp); return std::ldexp(x, exp);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> ldexp(vec<1, T, P> const& x, vec<1, int, P> const& exp) GLM_FUNC_QUALIFIER vec<1, T, P> ldexp(vec<1, T, P> const& x, vec<1, int, P> const& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
@ -842,7 +842,7 @@ namespace detail
ldexp(x.x, exp.x)); ldexp(x.x, exp.x));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> ldexp(vec<2, T, P> const& x, vec<2, int, P> const& exp) GLM_FUNC_QUALIFIER vec<2, T, P> ldexp(vec<2, T, P> const& x, vec<2, int, P> const& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
@ -852,7 +852,7 @@ namespace detail
ldexp(x.y, exp.y)); ldexp(x.y, exp.y));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> ldexp(vec<3, T, P> const& x, vec<3, int, P> const& exp) GLM_FUNC_QUALIFIER vec<3, T, P> ldexp(vec<3, T, P> const& x, vec<3, int, P> const& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");
@ -863,7 +863,7 @@ namespace detail
ldexp(x.z, exp.z)); ldexp(x.z, exp.z));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> ldexp(vec<4, T, P> const& x, vec<4, int, P> const& exp) GLM_FUNC_QUALIFIER vec<4, T, P> ldexp(vec<4, T, P> const& x, vec<4, int, P> const& exp)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'ldexp' only accept floating-point inputs");

View File

@ -10,7 +10,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<precision P> template<qualifier P>
struct compute_abs_vector<4, float, P, true> struct compute_abs_vector<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -21,7 +21,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_abs_vector<4, int, P, true> struct compute_abs_vector<4, int, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v) GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const & v)
@ -32,7 +32,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_floor<4, float, P, true> struct compute_floor<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -43,7 +43,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_ceil<4, float, P, true> struct compute_ceil<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -54,7 +54,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_fract<4, float, P, true> struct compute_fract<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -65,7 +65,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_round<4, float, P, true> struct compute_round<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -76,7 +76,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_mod<4, float, P, true> struct compute_mod<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y)
@ -87,7 +87,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_min_vector<4, float, P, true> struct compute_min_vector<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
@ -98,7 +98,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_min_vector<4, int32, P, true> struct compute_min_vector<4, int32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
@ -109,7 +109,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_min_vector<4, uint32, P, true> struct compute_min_vector<4, uint32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
@ -120,7 +120,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_max_vector<4, float, P, true> struct compute_max_vector<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
@ -131,7 +131,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_max_vector<4, int32, P, true> struct compute_max_vector<4, int32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
@ -142,7 +142,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_max_vector<4, uint32, P, true> struct compute_max_vector<4, uint32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2) GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & v1, vec<4, uint32, P> const & v2)
@ -153,7 +153,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_clamp_vector<4, float, P, true> struct compute_clamp_vector<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & minVal, vec<4, float, P> const & maxVal) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & minVal, vec<4, float, P> const & maxVal)
@ -164,7 +164,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_clamp_vector<4, int32, P, true> struct compute_clamp_vector<4, int32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & x, vec<4, int32, P> const & minVal, vec<4, int32, P> const & maxVal) GLM_FUNC_QUALIFIER static vec<4, int32, P> call(vec<4, int32, P> const & x, vec<4, int32, P> const & minVal, vec<4, int32, P> const & maxVal)
@ -175,7 +175,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_clamp_vector<4, uint32, P, true> struct compute_clamp_vector<4, uint32, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & x, vec<4, uint32, P> const & minVal, vec<4, uint32, P> const & maxVal) GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const & x, vec<4, uint32, P> const & minVal, vec<4, uint32, P> const & maxVal)
@ -186,7 +186,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_mix_vector<4, float, bool, P, true> struct compute_mix_vector<4, float, bool, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y, vec<4, bool, P> const & a) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & x, vec<4, float, P> const & y, vec<4, bool, P> const & a)
@ -204,7 +204,7 @@ namespace detail
} }
}; };
/* FIXME /* FIXME
template<precision P> template<qualifier P>
struct compute_step_vector<float, P, tvec4> struct compute_step_vector<float, P, tvec4>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge, vec<4, float, P> const& x)
@ -215,7 +215,7 @@ namespace detail
} }
}; };
*/ */
template<precision P> template<qualifier P>
struct compute_smoothstep_vector<4, float, P, true> struct compute_smoothstep_vector<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge0, vec<4, float, P> const& edge1, vec<4, float, P> const& x) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& edge0, vec<4, float, P> const& edge1, vec<4, float, P> const& x)

View File

@ -23,81 +23,81 @@ namespace glm
/// 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 precision. /// @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'.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml">GLSL pow 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> pow(vec<L, T, P> const & base, vec<L, T, P> const& exponent); GLM_FUNC_DECL vec<L, T, P> pow(vec<L, T, P> const & base, vec<L, T, P> const& exponent);
/// Returns the natural exponentiation of x, i.e., e^x. /// Returns the natural exponentiation of x, i.e., e^x.
/// ///
/// @param v exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision. /// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> exp(vec<L, T, P> const& v); GLM_FUNC_DECL vec<L, T, P> exp(vec<L, T, P> 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 precision. /// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> log(vec<L, T, P> const& v); GLM_FUNC_DECL vec<L, T, P> log(vec<L, T, P> 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 precision. /// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> exp2(vec<L, T, P> const& v); GLM_FUNC_DECL vec<L, T, P> exp2(vec<L, T, P> 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 precision. /// @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.
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml">GLSL log2 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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> log2(vec<L, T, P> const& v); GLM_FUNC_DECL vec<L, T, P> log2(vec<L, T, P> 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 precision. /// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> sqrt(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, T, P> sqrt(vec<L, T, P> 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 precision. /// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> inversesqrt(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, T, P> inversesqrt(vec<L, T, P> const & v);
/// @} /// @}

View File

@ -20,7 +20,7 @@ namespace detail
} }
# endif # endif
template<length_t L, typename T, precision P, bool isFloat, bool Aligned> template<length_t L, typename T, qualifier P, bool isFloat, bool Aligned>
struct compute_log2 struct compute_log2
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v)
@ -29,7 +29,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_sqrt struct compute_sqrt
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -38,7 +38,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_inversesqrt struct compute_inversesqrt
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const & x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const & x)
@ -66,7 +66,7 @@ namespace detail
// pow // pow
using std::pow; using std::pow;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> pow(vec<L, T, P> const & base, vec<L, T, P> const& exponent) GLM_FUNC_QUALIFIER vec<L, T, P> pow(vec<L, T, P> const & base, vec<L, T, P> const& exponent)
{ {
return detail::functor2<L, T, P>::call(pow, base, exponent); return detail::functor2<L, T, P>::call(pow, base, exponent);
@ -74,7 +74,7 @@ namespace detail
// exp // exp
using std::exp; using std::exp;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> exp(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> exp(vec<L, T, P> const& x)
{ {
return detail::functor1<L, T, T, P>::call(exp, x); return detail::functor1<L, T, T, P>::call(exp, x);
@ -82,7 +82,7 @@ namespace detail
// log // log
using std::log; using std::log;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> log(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> log(vec<L, T, P> const& x)
{ {
return detail::functor1<L, T, T, P>::call(log, x); return detail::functor1<L, T, T, P>::call(log, x);
@ -97,7 +97,7 @@ namespace detail
return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x); return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> exp2(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> exp2(vec<L, T, P> const& x)
{ {
return detail::functor1<L, T, T, P>::call(exp2, x); return detail::functor1<L, T, T, P>::call(exp2, x);
@ -110,7 +110,7 @@ namespace detail
return log2(vec<1, genType>(x)).x; return log2(vec<1, genType>(x)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> log2(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> log2(vec<L, T, P> const& x)
{ {
return detail::compute_log2<L, T, P, std::numeric_limits<T>::is_iec559, detail::is_aligned<P>::value>::call(x); return detail::compute_log2<L, T, P, std::numeric_limits<T>::is_iec559, detail::is_aligned<P>::value>::call(x);
@ -118,7 +118,7 @@ namespace detail
// sqrt // sqrt
using std::sqrt; using std::sqrt;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> sqrt(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> sqrt(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs");
@ -132,7 +132,7 @@ namespace detail
return static_cast<genType>(1) / sqrt(x); return static_cast<genType>(1) / sqrt(x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> inversesqrt(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> inversesqrt(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs");

View File

@ -8,7 +8,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<precision P> template<qualifier P>
struct compute_sqrt<4, float, P, true> struct compute_sqrt<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)

View File

@ -24,7 +24,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T length(vec<L, T, P> const& x); GLM_FUNC_DECL T length(vec<L, T, P> const& x);
/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
@ -34,7 +34,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T distance(vec<L, T, P> const& p0, vec<L, T, P> const& p1); GLM_FUNC_DECL T distance(vec<L, T, P> const& p0, vec<L, T, P> const& p1);
/// Returns the dot product of x and y, i.e., result = x * y. /// Returns the dot product of x and y, i.e., result = x * y.
@ -44,7 +44,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T dot(vec<L, T, P> const & x, vec<L, T, P> const & y); GLM_FUNC_DECL T dot(vec<L, T, P> const & x, vec<L, T, P> const & y);
/// Returns the cross product of x and y. /// Returns the cross product of x and y.
@ -53,7 +53,7 @@ namespace glm
/// ///
/// @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, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> cross(vec<3, T, P> const & x, vec<3, T, P> const & y); GLM_FUNC_DECL vec<3, T, P> cross(vec<3, T, P> const & x, vec<3, T, P> const & y);
/// Returns a vector in the same direction as x but with length of 1. /// Returns a vector in the same direction as x but with length of 1.
@ -64,7 +64,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> normalize(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> normalize(vec<L, T, P> const& x);
/// If dot(Nref, I) < 0.0, return N, otherwise, return -N. /// If dot(Nref, I) < 0.0, return N, otherwise, return -N.
@ -74,7 +74,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> faceforward( GLM_FUNC_DECL vec<L, T, P> faceforward(
vec<L, T, P> const& N, vec<L, T, P> const& N,
vec<L, T, P> const& I, vec<L, T, P> const& I,
@ -88,7 +88,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> reflect( GLM_FUNC_DECL vec<L, T, P> reflect(
vec<L, T, P> const& I, vec<L, T, P> const& I,
vec<L, T, P> const& N); vec<L, T, P> const& N);
@ -102,7 +102,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> refract( GLM_FUNC_DECL vec<L, T, P> refract(
vec<L, T, P> const& I, vec<L, T, P> const& I,
vec<L, T, P> const& N, vec<L, T, P> const& N,

View File

@ -10,7 +10,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_length struct compute_length
{ {
GLM_FUNC_QUALIFIER static T call(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER static T call(vec<L, T, P> const& v)
@ -19,7 +19,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_distance struct compute_distance
{ {
GLM_FUNC_QUALIFIER static T call(vec<L, T, P> const& p0, vec<L, T, P> const& p1) GLM_FUNC_QUALIFIER static T call(vec<L, T, P> const& p0, vec<L, T, P> const& p1)
@ -31,7 +31,7 @@ namespace detail
template<typename V, typename T, bool Aligned> template<typename V, typename T, bool Aligned>
struct compute_dot{}; struct compute_dot{};
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_dot<vec<1, T, P>, T, Aligned> struct compute_dot<vec<1, T, P>, T, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(vec<1, T, P> const& a, vec<1, T, P> const& b) GLM_FUNC_QUALIFIER static T call(vec<1, T, P> const& a, vec<1, T, P> const& b)
@ -40,7 +40,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_dot<vec<2, T, P>, T, Aligned> struct compute_dot<vec<2, T, P>, T, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(vec<2, T, P> const& a, vec<2, T, P> const& b) GLM_FUNC_QUALIFIER static T call(vec<2, T, P> const& a, vec<2, T, P> const& b)
@ -50,7 +50,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_dot<vec<3, T, P>, T, Aligned> struct compute_dot<vec<3, T, P>, T, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(vec<3, T, P> const& a, vec<3, T, P> const& b) GLM_FUNC_QUALIFIER static T call(vec<3, T, P> const& a, vec<3, T, P> const& b)
@ -60,7 +60,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_dot<vec<4, T, P>, T, Aligned> struct compute_dot<vec<4, T, P>, T, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(vec<4, T, P> const& a, vec<4, T, P> const& b) GLM_FUNC_QUALIFIER static T call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -70,7 +70,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_cross struct compute_cross
{ {
GLM_FUNC_QUALIFIER static vec<3, T, P> call(vec<3, T, P> const& x, vec<3, T, P> const& y) GLM_FUNC_QUALIFIER static vec<3, T, P> call(vec<3, T, P> const& x, vec<3, T, P> const& y)
@ -84,7 +84,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_normalize struct compute_normalize
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v)
@ -95,7 +95,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_faceforward struct compute_faceforward
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& N, vec<L, T, P> const& I, vec<L, T, P> const& Nref) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& N, vec<L, T, P> const& I, vec<L, T, P> const& Nref)
@ -106,7 +106,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_reflect struct compute_reflect
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& I, vec<L, T, P> const& N) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& I, vec<L, T, P> const& N)
@ -115,7 +115,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_refract struct compute_refract
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& I, vec<L, T, P> const& N, T eta) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& I, vec<L, T, P> const& N, T eta)
@ -136,7 +136,7 @@ namespace detail
return abs(x); return abs(x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER T length(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER T length(vec<L, T, P> const& v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' accepts only floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' accepts only floating-point inputs");
@ -153,7 +153,7 @@ namespace detail
return length(p1 - p0); return length(p1 - p0);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER T distance(vec<L, T, P> const& p0, vec<L, T, P> const& p1) GLM_FUNC_QUALIFIER T distance(vec<L, T, P> const& p0, vec<L, T, P> const& p1)
{ {
return detail::compute_distance<L, T, P, detail::is_aligned<P>::value>::call(p0, p1); return detail::compute_distance<L, T, P, detail::is_aligned<P>::value>::call(p0, p1);
@ -167,14 +167,14 @@ namespace detail
return x * y; return x * y;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER T dot(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER T dot(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs");
return detail::compute_dot<vec<L, T, P>, T, detail::is_aligned<P>::value>::call(x, y); return detail::compute_dot<vec<L, T, P>, T, detail::is_aligned<P>::value>::call(x, y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T dot(tquat<T, P> const& x, tquat<T, P> const& y) GLM_FUNC_QUALIFIER T dot(tquat<T, P> const& x, tquat<T, P> const& y)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs");
@ -182,7 +182,7 @@ namespace detail
} }
// cross // cross
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> cross(vec<3, T, P> const& x, vec<3, T, P> const& y) GLM_FUNC_QUALIFIER vec<3, T, P> cross(vec<3, T, P> const& x, vec<3, T, P> const& y)
{ {
return detail::compute_cross<T, P, detail::is_aligned<P>::value>::call(x, y); return detail::compute_cross<T, P, detail::is_aligned<P>::value>::call(x, y);
@ -197,7 +197,7 @@ namespace detail
return x < genType(0) ? genType(-1) : genType(1); return x < genType(0) ? genType(-1) : genType(1);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> normalize(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, T, P> normalize(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' accepts only floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' accepts only floating-point inputs");
@ -212,7 +212,7 @@ namespace detail
return dot(Nref, I) < static_cast<genType>(0) ? N : -N; return dot(Nref, I) < static_cast<genType>(0) ? N : -N;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> faceforward(vec<L, T, P> const& N, vec<L, T, P> const& I, vec<L, T, P> const& Nref) GLM_FUNC_QUALIFIER vec<L, T, P> faceforward(vec<L, T, P> const& N, vec<L, T, P> const& I, vec<L, T, P> const& Nref)
{ {
return detail::compute_faceforward<L, T, P, detail::is_aligned<P>::value>::call(N, I, Nref); return detail::compute_faceforward<L, T, P, detail::is_aligned<P>::value>::call(N, I, Nref);
@ -225,7 +225,7 @@ namespace detail
return I - N * dot(N, I) * genType(2); return I - N * dot(N, I) * genType(2);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> reflect(vec<L, T, P> const& I, vec<L, T, P> const& N) GLM_FUNC_QUALIFIER vec<L, T, P> reflect(vec<L, T, P> const& I, vec<L, T, P> const& N)
{ {
return detail::compute_reflect<L, T, P, detail::is_aligned<P>::value>::call(I, N); return detail::compute_reflect<L, T, P, detail::is_aligned<P>::value>::call(I, N);
@ -241,7 +241,7 @@ namespace detail
return (eta * I - (eta * dotValue + sqrt(k)) * N) * static_cast<genType>(k >= static_cast<genType>(0)); return (eta * I - (eta * dotValue + sqrt(k)) * N) * static_cast<genType>(k >= static_cast<genType>(0));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> refract(vec<L, T, P> const& I, vec<L, T, P> const& N, T eta) GLM_FUNC_QUALIFIER vec<L, T, P> refract(vec<L, T, P> const& I, vec<L, T, P> const& N, T eta)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'refract' accepts only floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'refract' accepts only floating-point inputs");

View File

@ -8,7 +8,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<precision P> template<qualifier P>
struct compute_length<4, float, P, true> struct compute_length<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & v)
@ -17,7 +17,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_distance<4, float, P, true> struct compute_distance<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & p0, vec<4, float, P> const & p1) GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const & p0, vec<4, float, P> const & p1)
@ -26,7 +26,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_dot<vec<4, float, P>, float, true> struct compute_dot<vec<4, float, P>, float, true>
{ {
GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const& x, vec<4, float, P> const& y) GLM_FUNC_QUALIFIER static float call(vec<4, float, P> const& x, vec<4, float, P> const& y)
@ -35,7 +35,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_cross<float, P, true> struct compute_cross<float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<3, float, P> call(vec<3, float, P> const & a, vec<3, float, P> const & b) GLM_FUNC_QUALIFIER static vec<3, float, P> call(vec<3, float, P> const & a, vec<3, float, P> const & b)
@ -50,7 +50,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_normalize<4, float, P, true> struct compute_normalize<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const & v)
@ -61,7 +61,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_faceforward<4, float, P, true> struct compute_faceforward<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& N, vec<4, float, P> const& I, vec<4, float, P> const& Nref) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& N, vec<4, float, P> const& I, vec<4, float, P> const& Nref)
@ -72,7 +72,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_reflect<4, float, P, true> struct compute_reflect<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N)
@ -83,7 +83,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_refract<4, float, P, true> struct compute_refract<4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta) GLM_FUNC_QUALIFIER static vec<4, float, P> call(vec<4, float, P> const& I, vec<4, float, P> const& N, float eta)

View File

@ -13,7 +13,7 @@
#pragma once #pragma once
#include "setup.hpp" #include "setup.hpp"
#include "precision.hpp" #include "qualifier.hpp"
#include "func_common.hpp" #include "func_common.hpp"
#include "func_vector_relational.hpp" #include "func_vector_relational.hpp"
@ -30,7 +30,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml">GLSL uaddCarry man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, uint, P> uaddCarry( GLM_FUNC_DECL vec<L, uint, P> uaddCarry(
vec<L, uint, P> const & x, vec<L, uint, P> const & x,
vec<L, uint, P> const & y, vec<L, uint, P> const & y,
@ -44,7 +44,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml">GLSL usubBorrow man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, uint, P> usubBorrow( GLM_FUNC_DECL vec<L, uint, P> usubBorrow(
vec<L, uint, P> const & x, vec<L, uint, P> const & x,
vec<L, uint, P> const & y, vec<L, uint, P> const & y,
@ -58,7 +58,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml">GLSL umulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL void umulExtended( GLM_FUNC_DECL void umulExtended(
vec<L, uint, P> const & x, vec<L, uint, P> const & x,
vec<L, uint, P> const & y, vec<L, uint, P> const & y,
@ -73,7 +73,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml">GLSL imulExtended man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL void imulExtended( GLM_FUNC_DECL void imulExtended(
vec<L, int, P> const & x, vec<L, int, P> const & x,
vec<L, int, P> const & y, vec<L, int, P> const & y,
@ -96,7 +96,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml">GLSL bitfieldExtract man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> bitfieldExtract( GLM_FUNC_DECL vec<L, T, P> bitfieldExtract(
vec<L, T, P> const& Value, vec<L, T, P> const& Value,
int Offset, int Offset,
@ -117,7 +117,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml">GLSL bitfieldInsert man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> bitfieldInsert( GLM_FUNC_DECL vec<L, T, P> bitfieldInsert(
vec<L, T, P> const& Base, vec<L, T, P> const& Base,
vec<L, T, P> const& Insert, vec<L, T, P> const& Insert,
@ -133,7 +133,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml">GLSL bitfieldReverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> bitfieldReverse(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, T, P> bitfieldReverse(vec<L, T, P> const & v);
/// Returns the number of bits set to 1 in the binary representation of value. /// Returns the number of bits set to 1 in the binary representation of value.
@ -152,7 +152,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml">GLSL bitCount man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, int, P> bitCount(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, int, P> bitCount(vec<L, T, P> const & v);
/// Returns the bit number of the least significant bit set to /// Returns the bit number of the least significant bit set to
@ -175,7 +175,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml">GLSL findLSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, int, P> findLSB(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, int, P> findLSB(vec<L, T, P> const & v);
/// Returns the bit number of the most significant bit in the binary representation of value. /// Returns the bit number of the most significant bit in the binary representation of value.
@ -200,7 +200,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml">GLSL findMSB man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, int, P> findMSB(vec<L, T, P> const & v); GLM_FUNC_DECL vec<L, int, P> findMSB(vec<L, T, P> const & v);
/// @} /// @}

View File

@ -30,7 +30,7 @@ namespace detail
return Bits >= static_cast<T>(sizeof(T) * 8) ? ~static_cast<T>(0) : (static_cast<T>(1) << Bits) - static_cast<T>(1); return Bits >= static_cast<T>(sizeof(T) * 8) ? ~static_cast<T>(0) : (static_cast<T>(1) << Bits) - static_cast<T>(1);
} }
template<length_t L, typename T, glm::precision P, bool Aligned, bool EXEC> template<length_t L, typename T, glm::qualifier P, bool Aligned, bool EXEC>
struct compute_bitfieldReverseStep struct compute_bitfieldReverseStep
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T, T) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T, T)
@ -39,7 +39,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, glm::precision P, bool Aligned> template<length_t L, typename T, glm::qualifier P, bool Aligned>
struct compute_bitfieldReverseStep<L, T, P, Aligned, true> struct compute_bitfieldReverseStep<L, T, P, Aligned, true>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Mask, T Shift) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Mask, T Shift)
@ -48,7 +48,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, glm::precision P, bool Aligned, bool EXEC> template<length_t L, typename T, glm::qualifier P, bool Aligned, bool EXEC>
struct compute_bitfieldBitCountStep struct compute_bitfieldBitCountStep
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T, T) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T, T)
@ -57,7 +57,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, glm::precision P, bool Aligned> template<length_t L, typename T, glm::qualifier P, bool Aligned>
struct compute_bitfieldBitCountStep<L, T, P, Aligned, true> struct compute_bitfieldBitCountStep<L, T, P, Aligned, true>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Mask, T Shift) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Mask, T Shift)
@ -104,7 +104,7 @@ namespace detail
# endif # endif
# endif//GLM_HAS_BITSCAN_WINDOWS # endif//GLM_HAS_BITSCAN_WINDOWS
template<length_t L, typename T, precision P, bool EXEC = true> template<length_t L, typename T, qualifier P, bool EXEC = true>
struct compute_findMSB_step_vec struct compute_findMSB_step_vec
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, T Shift) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, T Shift)
@ -113,7 +113,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct compute_findMSB_step_vec<L, T, P, false> struct compute_findMSB_step_vec<L, T, P, false>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, T) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x, T)
@ -122,7 +122,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, int> template<length_t L, typename T, qualifier P, int>
struct compute_findMSB_vec struct compute_findMSB_vec
{ {
GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& v)
@ -147,7 +147,7 @@ namespace detail
return IsNotNull ? int(Result) : -1; return IsNotNull ? int(Result) : -1;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct compute_findMSB_vec<L, T, P, 32> struct compute_findMSB_vec<L, T, P, 32>
{ {
GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& x)
@ -165,7 +165,7 @@ namespace detail
return IsNotNull ? int(Result) : -1; return IsNotNull ? int(Result) : -1;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct compute_findMSB_vec<L, T, P, 64> struct compute_findMSB_vec<L, T, P, 64>
{ {
GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, int, P> call(vec<L, T, P> const& x)
@ -186,7 +186,7 @@ namespace detail
return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1))); return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, uint, P> uaddCarry(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& Carry) GLM_FUNC_QUALIFIER vec<L, uint, P> uaddCarry(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& Carry)
{ {
vec<L, uint64, P> Value64(vec<L, uint64, P>(x) + vec<L, uint64, P>(y)); vec<L, uint64, P> Value64(vec<L, uint64, P>(x) + vec<L, uint64, P>(y));
@ -207,7 +207,7 @@ namespace detail
return static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + (static_cast<int64>(y) - static_cast<int64>(x))); return static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + (static_cast<int64>(y) - static_cast<int64>(x)));
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, uint, P> usubBorrow(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& Borrow) GLM_FUNC_QUALIFIER vec<L, uint, P> usubBorrow(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& Borrow)
{ {
Borrow = mix(vec<L, uint, P>(1), vec<L, uint, P>(0), greaterThanEqual(x, y)); Borrow = mix(vec<L, uint, P>(1), vec<L, uint, P>(0), greaterThanEqual(x, y));
@ -226,7 +226,7 @@ namespace detail
lsb = static_cast<uint>(Value64); lsb = static_cast<uint>(Value64);
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER void umulExtended(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& msb, vec<L, uint, P>& lsb) GLM_FUNC_QUALIFIER void umulExtended(vec<L, uint, P> const& x, vec<L, uint, P> const& y, vec<L, uint, P>& msb, vec<L, uint, P>& lsb)
{ {
GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch"); GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch");
@ -246,7 +246,7 @@ namespace detail
lsb = static_cast<int>(Value64); lsb = static_cast<int>(Value64);
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER void imulExtended(vec<L, int, P> const& x, vec<L, int, P> const& y, vec<L, int, P>& msb, vec<L, int, P>& lsb) GLM_FUNC_QUALIFIER void imulExtended(vec<L, int, P> const& x, vec<L, int, P> const& y, vec<L, int, P>& msb, vec<L, int, P>& lsb)
{ {
GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch"); GLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), "int and int32 size mismatch");
@ -263,7 +263,7 @@ namespace detail
return bitfieldExtract(vec<1, genIUType>(Value), Offset, Bits).x; return bitfieldExtract(vec<1, genIUType>(Value), Offset, Bits).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldExtract(vec<L, T, P> const& Value, int Offset, int Bits) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldExtract(vec<L, T, P> const& Value, int Offset, int Bits)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldExtract' only accept integer inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldExtract' only accept integer inputs");
@ -278,7 +278,7 @@ namespace detail
return bitfieldInsert(vec<1, genIUType>(Base), vec<1, genIUType>(Insert), Offset, Bits).x; return bitfieldInsert(vec<1, genIUType>(Base), vec<1, genIUType>(Insert), Offset, Bits).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldInsert(vec<L, T, P> const& Base, vec<L, T, P> const& Insert, int Offset, int Bits) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldInsert(vec<L, T, P> const& Base, vec<L, T, P> const& Insert, int Offset, int Bits)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldInsert' only accept integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldInsert' only accept integer values");
@ -294,7 +294,7 @@ namespace detail
return bitfieldReverse(glm::vec<1, genType, glm::defaultp>(x)).x; return bitfieldReverse(glm::vec<1, genType, glm::defaultp>(x)).x;
} }
template<length_t L, typename T, glm::precision P> template<length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldReverse(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldReverse(vec<L, T, P> const& v)
{ {
vec<L, T, P> x(v); vec<L, T, P> x(v);
@ -314,7 +314,7 @@ namespace detail
return bitCount(glm::vec<1, genType, glm::defaultp>(x)).x; return bitCount(glm::vec<1, genType, glm::defaultp>(x)).x;
} }
template<length_t L, typename T, glm::precision P> template<length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER vec<L, int, P> bitCount(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, int, P> bitCount(vec<L, T, P> const& v)
{ {
# if GLM_COMPILER & GLM_COMPILER_VC # if GLM_COMPILER & GLM_COMPILER_VC
@ -345,7 +345,7 @@ namespace detail
return detail::compute_findLSB<genIUType, sizeof(genIUType) * 8>::call(Value); return detail::compute_findLSB<genIUType, sizeof(genIUType) * 8>::call(Value);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, int, P> findLSB(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, int, P> findLSB(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findLSB' only accept integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findLSB' only accept integer values");
@ -362,7 +362,7 @@ namespace detail
return findMSB(vec<1, genIUType>(v)).x; return findMSB(vec<1, genIUType>(v)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, int, P> findMSB(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, int, P> findMSB(vec<L, T, P> const& v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findMSB' only accept integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findMSB' only accept integer values");

View File

@ -8,7 +8,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<glm::precision P> template<glm::qualifier P>
struct compute_bitfieldReverseStep<4, uint32, P, true, true> struct compute_bitfieldReverseStep<4, uint32, P, true, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const& v, uint32 Mask, uint32 Shift) GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const& v, uint32 Mask, uint32 Shift)
@ -29,7 +29,7 @@ namespace detail
} }
}; };
template<glm::precision P> template<glm::qualifier P>
struct compute_bitfieldBitCountStep<4, uint32, P, true, true> struct compute_bitfieldBitCountStep<4, uint32, P, true, true>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const& v, uint32 Mask, uint32 Shift) GLM_FUNC_QUALIFIER static vec<4, uint32, P> call(vec<4, uint32, P> const& v, uint32 Mask, uint32 Shift)

View File

@ -7,15 +7,15 @@
/// @ingroup core /// @ingroup core
/// ///
/// For each of the following built-in matrix functions, there is both a /// For each of the following built-in matrix functions, there is both a
/// single-precision floating point version, where all arguments and return values /// single-qualifier floating point version, where all arguments and return values
/// are single precision, and a double-precision floating version, where all /// are single qualifier, and a double-qualifier floating version, where all
/// arguments and return values are double precision. Only the single-precision /// arguments and return values are double qualifier. Only the single-qualifier
/// floating point version is shown. /// floating point version is shown.
#pragma once #pragma once
// Dependencies // Dependencies
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/type_mat.hpp" #include "../detail/type_mat.hpp"
#include "../vec2.hpp" #include "../vec2.hpp"
@ -34,55 +34,55 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<2, 2, T, P> struct outerProduct_trait<2, 2, T, P>
{ {
typedef mat<2, 2, T, P> type; typedef mat<2, 2, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<2, 3, T, P> struct outerProduct_trait<2, 3, T, P>
{ {
typedef mat<3, 2, T, P> type; typedef mat<3, 2, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<2, 4, T, P> struct outerProduct_trait<2, 4, T, P>
{ {
typedef mat<4, 2, T, P> type; typedef mat<4, 2, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<3, 2, T, P> struct outerProduct_trait<3, 2, T, P>
{ {
typedef mat<2, 3, T, P> type; typedef mat<2, 3, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<3, 3, T, P> struct outerProduct_trait<3, 3, T, P>
{ {
typedef mat<3, 3, T, P> type; typedef mat<3, 3, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<3, 4, T, P> struct outerProduct_trait<3, 4, T, P>
{ {
typedef mat<4, 3, T, P> type; typedef mat<4, 3, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<4, 2, T, P> struct outerProduct_trait<4, 2, T, P>
{ {
typedef mat<2, 4, T, P> type; typedef mat<2, 4, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<4, 3, T, P> struct outerProduct_trait<4, 3, T, P>
{ {
typedef mat<3, 4, T, P> type; typedef mat<3, 4, T, P> type;
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct outerProduct_trait<4, 4, T, P> struct outerProduct_trait<4, 4, T, P>
{ {
typedef mat<4, 4, T, P> type; typedef mat<4, 4, T, P> type;
@ -100,7 +100,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml">GLSL matrixCompMult man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template<typename T, precision P, template<typename, precision> class matType> template<typename T, qualifier P, template<typename, qualifier> class matType>
GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y); GLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);
/// Treats the first parameter c as a column vector /// Treats the first parameter c as a column vector
@ -109,7 +109,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml">GLSL outerProduct man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template<length_t DA, length_t DB, typename T, precision P> template<length_t DA, length_t DB, typename T, qualifier P>
GLM_FUNC_DECL typename detail::outerProduct_trait<DA, DB, T, P>::type outerProduct(vec<DA, T, P> const & c, vec<DB, T, P> const & r); GLM_FUNC_DECL typename detail::outerProduct_trait<DA, DB, T, P>::type outerProduct(vec<DA, T, P> const & c, vec<DB, T, P> const & r);
/// Returns the transposed matrix of x /// Returns the transposed matrix of x
@ -118,7 +118,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template<typename T, precision P, template<typename, precision> class matType> template<typename T, qualifier P, template<typename, qualifier> class matType>
GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x); GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
/// Return the determinant of a squared matrix. /// Return the determinant of a squared matrix.
@ -127,7 +127,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml">GLSL determinant man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template<typename T, precision P, template<typename, precision> class matType> template<typename T, qualifier P, template<typename, qualifier> class matType>
GLM_FUNC_DECL T determinant(matType<T, P> const & m); GLM_FUNC_DECL T determinant(matType<T, P> const & m);
/// Return the inverse of a squared matrix. /// Return the inverse of a squared matrix.
@ -136,7 +136,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml">GLSL inverse man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
template<typename T, precision P, template<typename, precision> class matType> template<typename T, qualifier P, template<typename, qualifier> class matType>
GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m); GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
/// @} /// @}

View File

@ -7,7 +7,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<template<length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned> template<template<length_t, length_t, typename, qualifier> class matType, length_t C, length_t R, typename T, qualifier P, bool Aligned>
struct compute_matrixCompMult struct compute_matrixCompMult
{ {
GLM_FUNC_QUALIFIER static matType<C, R, T, P> call(matType<C, R, T, P> const& x, matType<C, R, T, P> const& y) GLM_FUNC_QUALIFIER static matType<C, R, T, P> call(matType<C, R, T, P> const& x, matType<C, R, T, P> const& y)
@ -19,10 +19,10 @@ namespace detail
} }
}; };
template<template<length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned> template<template<length_t, length_t, typename, qualifier> class matType, length_t C, length_t R, typename T, qualifier P, bool Aligned>
struct compute_transpose{}; struct compute_transpose{};
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 2, 2, T, P, Aligned> struct compute_transpose<mat, 2, 2, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m)
@ -36,7 +36,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 2, 3, T, P, Aligned> struct compute_transpose<mat, 2, 3, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<3, 2, T, P> call(mat<2, 3, T, P> const& m) GLM_FUNC_QUALIFIER static mat<3, 2, T, P> call(mat<2, 3, T, P> const& m)
@ -52,7 +52,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 2, 4, T, P, Aligned> struct compute_transpose<mat, 2, 4, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<4, 2, T, P> call(mat<2, 4, T, P> const& m) GLM_FUNC_QUALIFIER static mat<4, 2, T, P> call(mat<2, 4, T, P> const& m)
@ -70,7 +70,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 3, 2, T, P, Aligned> struct compute_transpose<mat, 3, 2, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<2, 3, T, P> call(mat<3, 2, T, P> const& m) GLM_FUNC_QUALIFIER static mat<2, 3, T, P> call(mat<3, 2, T, P> const& m)
@ -86,7 +86,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 3, 3, T, P, Aligned> struct compute_transpose<mat, 3, 3, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m)
@ -107,7 +107,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 3, 4, T, P, Aligned> struct compute_transpose<mat, 3, 4, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<4, 3, T, P> call(mat<3, 4, T, P> const& m) GLM_FUNC_QUALIFIER static mat<4, 3, T, P> call(mat<3, 4, T, P> const& m)
@ -129,7 +129,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 4, 2, T, P, Aligned> struct compute_transpose<mat, 4, 2, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<2, 4, T, P> call(mat<4, 2, T, P> const& m) GLM_FUNC_QUALIFIER static mat<2, 4, T, P> call(mat<4, 2, T, P> const& m)
@ -147,7 +147,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 4, 3, T, P, Aligned> struct compute_transpose<mat, 4, 3, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<3, 4, T, P> call(mat<4, 3, T, P> const& m) GLM_FUNC_QUALIFIER static mat<3, 4, T, P> call(mat<4, 3, T, P> const& m)
@ -169,7 +169,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_transpose<mat, 4, 4, T, P, Aligned> struct compute_transpose<mat, 4, 4, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m)
@ -198,10 +198,10 @@ namespace detail
} }
}; };
template<template<length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned> template<template<length_t, length_t, typename, qualifier> class matType, length_t C, length_t R, typename T, qualifier P, bool Aligned>
struct compute_determinant{}; struct compute_determinant{};
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_determinant<mat, 2, 2, T, P, Aligned> struct compute_determinant<mat, 2, 2, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER static T call(mat<2, 2, T, P> const& m)
@ -210,7 +210,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_determinant<mat, 3, 3, T, P, Aligned> struct compute_determinant<mat, 3, 3, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER static T call(mat<3, 3, T, P> const& m)
@ -222,7 +222,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_determinant<mat, 4, 4, T, P, Aligned> struct compute_determinant<mat, 4, 4, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static T call(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER static T call(mat<4, 4, T, P> const& m)
@ -246,10 +246,10 @@ namespace detail
} }
}; };
template<template<length_t, length_t, typename, precision> class matType, length_t C, length_t R, typename T, precision P, bool Aligned> template<template<length_t, length_t, typename, qualifier> class matType, length_t C, length_t R, typename T, qualifier P, bool Aligned>
struct compute_inverse{}; struct compute_inverse{};
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_inverse<mat, 2, 2, T, P, Aligned> struct compute_inverse<mat, 2, 2, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER static mat<2, 2, T, P> call(mat<2, 2, T, P> const& m)
@ -268,7 +268,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_inverse<mat, 3, 3, T, P, Aligned> struct compute_inverse<mat, 3, 3, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER static mat<3, 3, T, P> call(mat<3, 3, T, P> const& m)
@ -293,7 +293,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_inverse<mat, 4, 4, T, P, Aligned> struct compute_inverse<mat, 4, 4, T, P, Aligned>
{ {
GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER static mat<4, 4, T, P> call(mat<4, 4, T, P> const& m)
@ -355,14 +355,14 @@ namespace detail
}; };
}//namespace detail }//namespace detail
template<length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType> template<length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
GLM_FUNC_QUALIFIER matType<C, R, T, P> matrixCompMult(matType<C, R, T, P> const & x, matType<C, R, T, P> const & y) GLM_FUNC_QUALIFIER matType<C, R, T, P> matrixCompMult(matType<C, R, T, P> const & x, matType<C, R, T, P> const & y)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs");
return detail::compute_matrixCompMult<matType, C, R, T, P, detail::is_aligned<P>::value>::call(x, y); return detail::compute_matrixCompMult<matType, C, R, T, P, detail::is_aligned<P>::value>::call(x, y);
} }
template<length_t DA, length_t DB, typename T, precision P> template<length_t DA, length_t DB, typename T, qualifier P>
GLM_FUNC_QUALIFIER typename detail::outerProduct_trait<DA, DB, T, P>::type outerProduct(vec<DA, T, P> const & c, vec<DB, T, P> const & r) GLM_FUNC_QUALIFIER typename detail::outerProduct_trait<DA, DB, T, P>::type outerProduct(vec<DA, T, P> const & c, vec<DB, T, P> const & r)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs");
@ -373,21 +373,21 @@ namespace detail
return m; return m;
} }
template<length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType> template<length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
GLM_FUNC_QUALIFIER typename matType<C, R, T, P>::transpose_type transpose(matType<C, R, T, P> const & m) GLM_FUNC_QUALIFIER typename matType<C, R, T, P>::transpose_type transpose(matType<C, R, T, P> const & m)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs");
return detail::compute_transpose<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m); return detail::compute_transpose<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m);
} }
template<length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType> template<length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
GLM_FUNC_QUALIFIER T determinant(matType<C, R, T, P> const & m) GLM_FUNC_QUALIFIER T determinant(matType<C, R, T, P> const & m)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs");
return detail::compute_determinant<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m); return detail::compute_determinant<matType, C, R, T, P, detail::is_aligned<P>::value>::call(m);
} }
template<length_t C, length_t R, typename T, precision P, template<length_t, length_t, typename, precision> class matType> template<length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
GLM_FUNC_QUALIFIER matType<C, R, T, P> inverse(matType<C, R, T, P> const & m) GLM_FUNC_QUALIFIER matType<C, R, T, P> inverse(matType<C, R, T, P> const & m)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs");

View File

@ -11,7 +11,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<precision P> template<qualifier P>
struct compute_matrixCompMult<mat, 4, 4, float, P, true> struct compute_matrixCompMult<mat, 4, 4, float, P, true>
{ {
GLM_STATIC_ASSERT(detail::is_aligned<P>::value, "Specialization requires aligned"); GLM_STATIC_ASSERT(detail::is_aligned<P>::value, "Specialization requires aligned");
@ -27,7 +27,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_transpose<mat, 4, 4, float, P, true> struct compute_transpose<mat, 4, 4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & m) GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & m)
@ -40,7 +40,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_determinant<mat, 4, 4, float, P, true> struct compute_determinant<mat, 4, 4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static float call(mat<4, 4, float, P> const& m) GLM_FUNC_QUALIFIER static float call(mat<4, 4, float, P> const& m)
@ -49,7 +49,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_inverse<mat, 4, 4, float, P, true> struct compute_inverse<mat, 4, 4, float, P, true>
{ {
GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& m) GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& m)

View File

@ -123,7 +123,7 @@ 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 unpackSnorm4x8(uint p); GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p);
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value. /// Returns a double-qualifier value obtained by packing the components of v into a 64-bit value.
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
/// Otherwise, the bit- level representation of v is preserved. /// Otherwise, the bit- level representation of v is preserved.
/// The first vector component specifies the 32 least significant bits; /// The first vector component specifies the 32 least significant bits;

View File

@ -15,7 +15,7 @@
#pragma once #pragma once
#include "setup.hpp" #include "setup.hpp"
#include "precision.hpp" #include "qualifier.hpp"
namespace glm namespace glm
{ {
@ -26,22 +26,22 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml">GLSL radians man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, P> radians(vec<L, T, P> const& degrees); GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, P> radians(vec<L, T, P> const& degrees);
/// Converts radians to degrees and returns the result. /// Converts radians to degrees and returns the result.
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml">GLSL degrees man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, P> degrees(vec<L, T, P> const& radians); GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, P> degrees(vec<L, T, P> const& radians);
/// The standard trigonometric sine function. /// The standard trigonometric sine function.
@ -49,11 +49,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml">GLSL sin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> sin(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> sin(vec<L, T, P> const& angle);
/// The standard trigonometric cosine function. /// The standard trigonometric cosine function.
@ -61,22 +61,22 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml">GLSL cos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> cos(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> cos(vec<L, T, P> const& angle);
/// The standard trigonometric tangent function. /// The standard trigonometric tangent function.
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml">GLSL tan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> tan(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> tan(vec<L, T, P> const& angle);
/// Arc sine. Returns an angle whose sine is x. /// Arc sine. Returns an angle whose sine is x.
@ -85,11 +85,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml">GLSL asin man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> asin(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> asin(vec<L, T, P> const& x);
/// Arc cosine. Returns an angle whose sine is x. /// Arc cosine. Returns an angle whose sine is x.
@ -98,11 +98,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml">GLSL acos man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> acos(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> acos(vec<L, T, P> const& x);
/// Arc tangent. Returns an angle whose tangent is y/x. /// Arc tangent. Returns an angle whose tangent is y/x.
@ -113,11 +113,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> atan(vec<L, T, P> const& y, vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> atan(vec<L, T, P> const& y, vec<L, T, P> const& x);
/// Arc tangent. Returns an angle whose tangent is y_over_x. /// Arc tangent. Returns an angle whose tangent is y_over_x.
@ -125,55 +125,55 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml">GLSL atan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> atan(vec<L, T, P> const& y_over_x); GLM_FUNC_DECL vec<L, T, P> atan(vec<L, T, P> const& y_over_x);
/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml">GLSL sinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> sinh(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> sinh(vec<L, T, P> const& angle);
/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml">GLSL cosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> cosh(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> cosh(vec<L, T, P> const& angle);
/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml">GLSL tanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> tanh(vec<L, T, P> const& angle); GLM_FUNC_DECL vec<L, T, P> tanh(vec<L, T, P> const& angle);
/// Arc hyperbolic sine; returns the inverse of sinh. /// Arc hyperbolic sine; returns the inverse of sinh.
/// ///
/// @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 P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml">GLSL asinh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> asinh(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> asinh(vec<L, T, P> const& x);
/// Arc hyperbolic cosine; returns the non-negative inverse /// Arc hyperbolic cosine; returns the non-negative inverse
@ -181,11 +181,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml">GLSL acosh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> acosh(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> acosh(vec<L, T, P> const& x);
/// Arc hyperbolic tangent; returns the inverse of tanh. /// Arc hyperbolic tangent; returns the inverse of tanh.
@ -193,11 +193,11 @@ 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 scalar types /// @tparam T Floating-point scalar types
/// @tparam P Enumeration value precision /// @tparam P Enumeration value qualifier
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml">GLSL atanh man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> atanh(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, T, P> atanh(vec<L, T, P> const& x);
/// @} /// @}

View File

@ -16,7 +16,7 @@ namespace glm
return degrees * static_cast<genType>(0.01745329251994329576923690768489); return degrees * static_cast<genType>(0.01745329251994329576923690768489);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, P> radians(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, P> radians(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(radians, v); return detail::functor1<L, T, T, P>::call(radians, v);
@ -31,7 +31,7 @@ namespace glm
return radians * static_cast<genType>(57.295779513082320876798154814105); return radians * static_cast<genType>(57.295779513082320876798154814105);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, P> degrees(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, P> degrees(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(degrees, v); return detail::functor1<L, T, T, P>::call(degrees, v);
@ -40,7 +40,7 @@ namespace glm
// sin // sin
using ::std::sin; using ::std::sin;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> sin(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> sin(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(sin, v); return detail::functor1<L, T, T, P>::call(sin, v);
@ -49,7 +49,7 @@ namespace glm
// cos // cos
using std::cos; using std::cos;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> cos(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> cos(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(cos, v); return detail::functor1<L, T, T, P>::call(cos, v);
@ -58,7 +58,7 @@ namespace glm
// tan // tan
using std::tan; using std::tan;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> tan(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> tan(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(tan, v); return detail::functor1<L, T, T, P>::call(tan, v);
@ -67,7 +67,7 @@ namespace glm
// asin // asin
using std::asin; using std::asin;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> asin(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> asin(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(asin, v); return detail::functor1<L, T, T, P>::call(asin, v);
@ -76,7 +76,7 @@ namespace glm
// acos // acos
using std::acos; using std::acos;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> acos(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> acos(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(acos, v); return detail::functor1<L, T, T, P>::call(acos, v);
@ -91,7 +91,7 @@ namespace glm
return ::std::atan2(y, x); return ::std::atan2(y, x);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> atan(vec<L, T, P> const& a, vec<L, T, P> const& b) GLM_FUNC_QUALIFIER vec<L, T, P> atan(vec<L, T, P> const& a, vec<L, T, P> const& b)
{ {
return detail::functor2<L, T, P>::call(::std::atan2, a, b); return detail::functor2<L, T, P>::call(::std::atan2, a, b);
@ -99,7 +99,7 @@ namespace glm
using std::atan; using std::atan;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> atan(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> atan(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(atan, v); return detail::functor1<L, T, T, P>::call(atan, v);
@ -108,7 +108,7 @@ namespace glm
// sinh // sinh
using std::sinh; using std::sinh;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> sinh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> sinh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(sinh, v); return detail::functor1<L, T, T, P>::call(sinh, v);
@ -117,7 +117,7 @@ namespace glm
// cosh // cosh
using std::cosh; using std::cosh;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> cosh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> cosh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(cosh, v); return detail::functor1<L, T, T, P>::call(cosh, v);
@ -126,7 +126,7 @@ namespace glm
// tanh // tanh
using std::tanh; using std::tanh;
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> tanh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> tanh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(tanh, v); return detail::functor1<L, T, T, P>::call(tanh, v);
@ -145,7 +145,7 @@ namespace glm
} }
# endif # endif
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> asinh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> asinh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(asinh, v); return detail::functor1<L, T, T, P>::call(asinh, v);
@ -166,7 +166,7 @@ namespace glm
} }
# endif # endif
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> acosh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> acosh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(acosh, v); return detail::functor1<L, T, T, P>::call(acosh, v);
@ -187,7 +187,7 @@ namespace glm
} }
# endif # endif
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> atanh(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> atanh(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(atanh, v); return detail::functor1<L, T, T, P>::call(atanh, v);

View File

@ -15,7 +15,7 @@
#pragma once #pragma once
#include "precision.hpp" #include "qualifier.hpp"
#include "setup.hpp" #include "setup.hpp"
namespace glm namespace glm
@ -30,7 +30,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml">GLSL lessThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> lessThan(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> lessThan(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the component-wise comparison of result x <= y. /// Returns the component-wise comparison of result x <= y.
@ -40,7 +40,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml">GLSL lessThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> lessThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> lessThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the component-wise comparison of result x > y. /// Returns the component-wise comparison of result x > y.
@ -50,7 +50,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml">GLSL greaterThan man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> greaterThan(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> greaterThan(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the component-wise comparison of result x >= y. /// Returns the component-wise comparison of result x >= y.
@ -60,7 +60,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml">GLSL greaterThanEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> greaterThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> greaterThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the component-wise comparison of result x == y. /// Returns the component-wise comparison of result x == y.
@ -70,7 +70,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml">GLSL equal man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> equal(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> equal(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns the component-wise comparison of result x != y. /// Returns the component-wise comparison of result x != y.
@ -80,7 +80,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml">GLSL notEqual man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> notEqual(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, bool, P> notEqual(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns true if any component of x is true. /// Returns true if any component of x is true.
@ -89,7 +89,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml">GLSL any man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL bool any(vec<L, bool, P> const& v); GLM_FUNC_DECL bool any(vec<L, bool, P> const& v);
/// Returns true if all components of x are true. /// Returns true if all components of x are true.
@ -98,7 +98,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml">GLSL all man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL bool all(vec<L, bool, P> const& v); GLM_FUNC_DECL bool all(vec<L, bool, P> const& v);
/// Returns the component-wise logical complement of x. /// Returns the component-wise logical complement of x.
@ -108,7 +108,7 @@ namespace glm
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml">GLSL not man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> not_(vec<L, bool, P> const& v); GLM_FUNC_DECL vec<L, bool, P> not_(vec<L, bool, P> const& v);
/// @} /// @}

View File

@ -5,7 +5,7 @@
namespace glm namespace glm
{ {
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> lessThan(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> lessThan(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -17,7 +17,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> lessThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> lessThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -28,7 +28,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> greaterThan(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> greaterThan(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -39,7 +39,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> greaterThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> greaterThanEqual(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -50,7 +50,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> equal(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> equal(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -61,7 +61,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> notEqual(vec<L, T, P> const& x, vec<L, T, P> const& y) GLM_FUNC_QUALIFIER vec<L, bool, P> notEqual(vec<L, T, P> const& x, vec<L, T, P> const& y)
{ {
assert(x.length() == y.length()); assert(x.length() == y.length());
@ -72,7 +72,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER bool any(vec<L, bool, P> const& v) GLM_FUNC_QUALIFIER bool any(vec<L, bool, P> const& v)
{ {
bool Result = false; bool Result = false;
@ -81,7 +81,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER bool all(vec<L, bool, P> const& v) GLM_FUNC_QUALIFIER bool all(vec<L, bool, P> const& v)
{ {
bool Result = true; bool Result = true;
@ -90,7 +90,7 @@ namespace glm
return Result; return Result;
} }
template<length_t L, precision P> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> not_(vec<L, bool, P> const& v) GLM_FUNC_QUALIFIER vec<L, bool, P> not_(vec<L, bool, P> const& v)
{ {
vec<L, bool, P> Result; vec<L, bool, P> Result;

View File

@ -1,5 +1,5 @@
/// @ref core /// @ref core
/// @file glm/detail/precision.hpp /// @file glm/detail/qualifier.hpp
#pragma once #pragma once
@ -7,8 +7,8 @@
namespace glm namespace glm
{ {
/// enum precision /// Qualify GLM types in term of alignment (packed, aligned) and precision in term of ULPs (lowp, mediump, highp)
enum precision enum qualifier
{ {
packed_highp, packed_highp,
packed_mediump, packed_mediump,
@ -33,12 +33,12 @@ namespace glm
# endif # endif
}; };
template<length_t L, typename T, precision P = defaultp> struct vec; template<length_t L, typename T, qualifier P = defaultp> struct vec;
template<length_t C, length_t R, typename T, precision P = defaultp> struct mat; template<length_t C, length_t R, typename T, qualifier P = defaultp> struct mat;
namespace detail namespace detail
{ {
template<glm::precision P> template<glm::qualifier P>
struct is_aligned struct is_aligned
{ {
static const bool value = false; static const bool value = false;

View File

@ -19,22 +19,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// Low precision floating-point numbers. /// Low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// Medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// High qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>

View File

@ -216,43 +216,43 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// Low precision signed integer. /// Low qualifier signed integer.
/// There is no guarantee on the actual precision. /// 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 precision signed integer. /// Medium qualifier signed integer.
/// There is no guarantee on the actual precision. /// 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 precision signed integer. /// High qualifier signed integer.
/// There is no guarantee on the actual precision. /// 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 precision unsigned integer. /// Low qualifier unsigned integer.
/// There is no guarantee on the actual precision. /// 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 precision unsigned integer. /// Medium qualifier unsigned integer.
/// There is no guarantee on the actual precision. /// 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 precision unsigned integer. /// High qualifier unsigned integer.
/// There is no guarantee on the actual precision. /// 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>

View File

@ -3,70 +3,70 @@
#pragma once #pragma once
#include "precision.hpp" #include "qualifier.hpp"
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t Columns, length_t Rows, typename T, precision P> template<length_t Columns, length_t Rows, typename T, qualifier P>
struct outerProduct_trait{}; struct outerProduct_trait{};
}//namespace detail }//namespace detail
#if GLM_HAS_TEMPLATE_ALIASES #if GLM_HAS_TEMPLATE_ALIASES
template <typename T, precision P = defaultp> using tmat2x2 = mat<2, 2, T, P>; template <typename T, qualifier P = defaultp> using tmat2x2 = mat<2, 2, T, P>;
template <typename T, precision P = defaultp> using tmat2x3 = mat<2, 3, T, P>; template <typename T, qualifier P = defaultp> using tmat2x3 = mat<2, 3, T, P>;
template <typename T, precision P = defaultp> using tmat2x4 = mat<2, 4, T, P>; template <typename T, qualifier P = defaultp> using tmat2x4 = mat<2, 4, T, P>;
template <typename T, precision P = defaultp> using tmat3x2 = mat<3, 2, T, P>; template <typename T, qualifier P = defaultp> using tmat3x2 = mat<3, 2, T, P>;
template <typename T, precision P = defaultp> using tmat3x3 = mat<3, 3, T, P>; template <typename T, qualifier P = defaultp> using tmat3x3 = mat<3, 3, T, P>;
template <typename T, precision P = defaultp> using tmat3x4 = mat<3, 4, T, P>; template <typename T, qualifier P = defaultp> using tmat3x4 = mat<3, 4, T, P>;
template <typename T, precision P = defaultp> using tmat4x2 = mat<4, 2, T, P>; template <typename T, qualifier P = defaultp> using tmat4x2 = mat<4, 2, T, P>;
template <typename T, precision P = defaultp> using tmat4x3 = mat<4, 3, T, P>; template <typename T, qualifier P = defaultp> using tmat4x3 = mat<4, 3, T, P>;
template <typename T, precision P = defaultp> using tmat4x4 = mat<4, 4, T, P>; template <typename T, qualifier P = defaultp> using tmat4x4 = mat<4, 4, T, P>;
#endif//GLM_HAS_TEMPLATE_ALIASES #endif//GLM_HAS_TEMPLATE_ALIASES
template<typename T, precision P, template<typename, precision> class matType> template<typename T, qualifier P, template<typename, qualifier> class matType>
GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m); GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 2 components matrix of low precision floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -77,22 +77,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 3 components matrix of low precision floating-point numbers. /// 2 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -103,22 +103,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 4 components matrix of low precision floating-point numbers. /// 2 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 2 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -129,22 +129,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 2 components matrix of low precision floating-point numbers. /// 3 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -155,43 +155,43 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 3 components matrix of low precision floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -202,22 +202,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 4 components matrix of low precision floating-point numbers. /// 3 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 3 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -228,22 +228,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 2 components matrix of low precision floating-point numbers. /// 4 columns of 2 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 2 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 2 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -254,22 +254,22 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 3 components matrix of low precision floating-point numbers. /// 4 columns of 3 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 3 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 3 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -281,43 +281,43 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 4 components matrix of low precision floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 4 components matrix of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 4 components matrix of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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 precision floating-point numbers. /// 4 columns of 4 components matrix of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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>
@ -420,37 +420,37 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 2 components matrix of low precision 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 precision 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 precision 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 precision 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 precision 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 precision 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>
@ -461,19 +461,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 3 components matrix of low precision 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 precision 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 precision 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>
@ -484,19 +484,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 columns of 4 components matrix of low precision 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 precision 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 precision 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>
@ -507,19 +507,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 2 components matrix of low precision 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 precision 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 precision 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>
@ -530,37 +530,37 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 3 components matrix of low precision 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 precision 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 precision 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 precision 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 precision 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 precision 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>
@ -571,19 +571,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 columns of 4 components matrix of low precision 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 precision 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 precision 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>
@ -594,19 +594,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 2 components matrix of low precision 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 precision 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 precision 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>
@ -617,19 +617,19 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 3 components matrix of low precision 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 precision 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 precision 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>
@ -640,37 +640,37 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 columns of 4 components matrix of low precision 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 precision 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 precision 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 precision 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 precision 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 precision 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>
@ -700,62 +700,62 @@ namespace detail
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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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-precision 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;

View File

@ -11,7 +11,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<2, 2, T, P> struct mat<2, 2, T, P>
{ {
typedef vec<2, T, P> col_type; typedef vec<2, T, P> col_type;
@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<2, 2, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<2, 2, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<2, 2, T, Q> const & m); GLM_FUNC_DECL mat(mat<2, 2, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -61,7 +61,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const & x);
@ -106,74 +106,74 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator*(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator*(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator*(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m); GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator*(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m); GLM_FUNC_DECL mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m); GLM_FUNC_DECL typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2);
} //namespace glm } //namespace glm

View File

@ -8,13 +8,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat() GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, P> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -22,22 +22,22 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, T, Q> const& m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
this->value[1] = col_type(0, scalar); this->value[1] = col_type(0, scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat
( (
T const & x0, T const & y0, T const & x0, T const & y0,
@ -48,7 +48,7 @@ namespace glm
this->value[1] = col_type(x1, y1); this->value[1] = col_type(x1, y1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(col_type const& v0, col_type const& v1) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(col_type const& v0, col_type const& v1)
{ {
this->value[0] = v0; this->value[0] = v0;
@ -57,7 +57,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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, P>::mat GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat
( (
@ -69,7 +69,7 @@ namespace glm
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, precision P> template<typename T, qualifier P>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(vec<2, V1, P> const& v1, vec<2, V2, P> const& v2) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(vec<2, V1, P> const& v1, vec<2, V2, P> const& v2)
{ {
@ -79,64 +79,64 @@ namespace glm
// -- mat2x2 matrix conversions -- // -- mat2x2 matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, U, Q> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 2, U, 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 3, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 2, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 2, T, P> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 4, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<2, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 2, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 2, T, P> const& m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 4, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<3, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 3, T, P> const& m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat(mat<4, 3, T, P> const& m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -145,14 +145,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type const& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type const& mat<2, 2, T, P>::operator[](typename mat<2, 2, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -162,7 +162,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -171,7 +171,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator=(mat<2, 2, U, P> const & m)
{ {
@ -180,7 +180,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(U scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(U scalar)
{ {
@ -189,7 +189,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(mat<2, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator+=(mat<2, 2, U, P> const & m)
{ {
@ -198,7 +198,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(U scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(U scalar)
{ {
@ -207,7 +207,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(mat<2, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator-=(mat<2, 2, U, P> const & m)
{ {
@ -216,7 +216,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(U scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(U scalar)
{ {
@ -225,14 +225,14 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(mat<2, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator*=(mat<2, 2, U, P> const & m)
{ {
return (*this = *this * m); return (*this = *this * m);
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(U scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(U scalar)
{ {
@ -241,7 +241,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(mat<2, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator/=(mat<2, 2, U, P> const & m)
{ {
@ -250,7 +250,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator++() GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -258,7 +258,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator--() GLM_FUNC_QUALIFIER mat<2, 2, T, P>& mat<2, 2, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -266,7 +266,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator++(int)
{ {
mat<2, 2, T, P> Result(*this); mat<2, 2, T, P> Result(*this);
@ -274,7 +274,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<2, 2, T, P> mat<2, 2, T, P>::operator--(int)
{ {
mat<2, 2, T, P> Result(*this); mat<2, 2, T, P> Result(*this);
@ -284,13 +284,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -300,7 +300,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m, T scalar)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -308,7 +308,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(T scalar, mat<2, 2, T, P> const & m)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -316,7 +316,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator+(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -324,7 +324,7 @@ namespace glm
m1[1] + m2[1]); m1[1] + m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m, T scalar)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -332,7 +332,7 @@ namespace glm
m[1] - scalar); m[1] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(T scalar, mat<2, 2, T, P> const & m)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -340,7 +340,7 @@ namespace glm
scalar - m[1]); scalar - m[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator-(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -348,7 +348,7 @@ namespace glm
m1[1] - m2[1]); m1[1] - m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m, T scalar)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -356,7 +356,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(T scalar, mat<2, 2, T, P> const & m)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -364,7 +364,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator* GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator*
( (
mat<2, 2, T, P> const& m, mat<2, 2, T, P> const& m,
@ -376,7 +376,7 @@ namespace glm
m[0][1] * v.x + m[1][1] * v.y); m[0][1] * v.x + m[1][1] * v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator* GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator*
( (
typename mat<2, 2, T, P>::col_type const & v, typename mat<2, 2, T, P>::col_type const & v,
@ -388,7 +388,7 @@ namespace glm
v.x * m[1][0] + v.y * m[1][1]); v.x * m[1][0] + v.y * m[1][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -398,7 +398,7 @@ namespace glm
m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]); m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -410,7 +410,7 @@ namespace glm
m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]); m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<2, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m, T scalar)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -432,7 +432,7 @@ namespace glm
m[1] / scalar); m[1] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(T scalar, mat<2, 2, T, P> const & m)
{ {
return mat<2, 2, T, P>( return mat<2, 2, T, P>(
@ -440,19 +440,19 @@ namespace glm
scalar / m[1]); scalar / m[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::col_type operator/(mat<2, 2, T, P> const & m, typename mat<2, 2, T, P>::row_type const & v)
{ {
return inverse(m) * v; return inverse(m) * v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<2, 2, T, P>::row_type operator/(typename mat<2, 2, T, P>::col_type const & v, mat<2, 2, T, P> const & m)
{ {
return v * inverse(m); return v * inverse(m);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator/(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
mat<2, 2, T, P> m1_copy(m1); mat<2, 2, T, P> m1_copy(m1);
@ -461,13 +461,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]); return (m1[0] == m2[0]) && (m1[1] == m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<2, 2, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]); return (m1[0] != m2[0]) || (m1[1] != m2[1]);

View File

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<2, 3, T, P> struct mat<2, 3, T, P>
{ {
typedef vec<3, T, P> col_type; typedef vec<3, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<2, 3, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<2, 3, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<2, 3, T, Q> const & m); GLM_FUNC_DECL mat(mat<2, 3, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -62,7 +62,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -103,59 +103,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m); GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m); GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m); GLM_FUNC_DECL mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 3, T, P>::col_type operator*(mat<2, 3, T, P> const & m, typename mat<2, 3, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<2, 3, T, P>::col_type operator*(mat<2, 3, T, P> const & m, typename mat<2, 3, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 3, T, P>::row_type operator*(typename mat<2, 3, T, P>::col_type const & v, mat<2, 3, T, P> const & m); GLM_FUNC_DECL typename mat<2, 3, T, P>::row_type operator*(typename mat<2, 3, T, P>::col_type const & v, mat<2, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m); GLM_FUNC_DECL mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat() GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -20,22 +20,22 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, Q> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat
( (
T x0, T y0, T z0, T x0, T y0, T z0,
@ -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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(col_type const & v0, col_type const & v1) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(col_type const & v0, col_type const & v1)
{ {
this->value[0] = v0; this->value[0] = v0;
@ -55,7 +55,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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>
@ -69,7 +69,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));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(vec<3, V1, P> const & v1, vec<3, V2, P> const & v2)
{ {
@ -79,64 +79,64 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, U, Q> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 3, U, 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 2, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<2, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 2, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<3, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 2, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -145,14 +145,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type const & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type const & mat<2, 3, T, P>::operator[](typename mat<2, 3, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -162,7 +162,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -171,7 +171,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator=(mat<2, 3, U, P> const & m)
{ {
@ -180,7 +180,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator+=(U s)
{ {
@ -189,7 +189,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator+=(mat<2, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator+=(mat<2, 3, U, P> const & m)
{ {
@ -198,7 +198,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(U s)
{ {
@ -207,7 +207,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(mat<2, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator-=(mat<2, 3, U, P> const & m)
{ {
@ -216,7 +216,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<2, 3, T, P>& mat<2, 3, T, P>::operator*=(U s)
{ {
@ -225,7 +225,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator/=(U s)
{ {
@ -236,7 +236,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator++() GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -244,7 +244,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator--() GLM_FUNC_QUALIFIER mat<2, 3, T, P> & mat<2, 3, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -252,7 +252,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator++(int)
{ {
mat<2, 3, T, P> Result(*this); mat<2, 3, T, P> Result(*this);
@ -260,7 +260,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<2, 3, T, P> mat<2, 3, T, P>::operator--(int)
{ {
mat<2, 3, T, P> Result(*this); mat<2, 3, T, P> Result(*this);
@ -270,13 +270,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -286,7 +286,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m, T scalar)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -294,7 +294,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator+(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -302,7 +302,7 @@ namespace glm
m1[1] + m2[1]); m1[1] + m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m, T scalar)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -310,7 +310,7 @@ namespace glm
m[1] - scalar); m[1] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator-(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -318,7 +318,7 @@ namespace glm
m1[1] - m2[1]); m1[1] - m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m, T scalar)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -326,7 +326,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(T scalar, mat<2, 3, T, P> const & m)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -334,7 +334,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type operator* GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::col_type operator*
( (
mat<2, 3, T, P> const& m, mat<2, 3, T, P> const& m,
@ -346,7 +346,7 @@ namespace glm
m[0][2] * v.x + m[1][2] * v.y); m[0][2] * v.x + m[1][2] * v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::row_type operator* GLM_FUNC_QUALIFIER typename mat<2, 3, T, P>::row_type operator*
( (
typename mat<2, 3, T, P>::col_type const & v, typename mat<2, 3, T, P>::col_type const & v,
@ -357,7 +357,7 @@ namespace glm
v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]); v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -369,7 +369,7 @@ namespace glm
m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]); m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<3, 2, T, P> const & m2)
{ {
T SrcA00 = m1[0][0]; T SrcA00 = m1[0][0];
@ -399,7 +399,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<2, 3, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -417,7 +417,7 @@ namespace glm
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]); m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(mat<2, 3, T, P> const & m, T scalar)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -425,7 +425,7 @@ namespace glm
m[1] / scalar); m[1] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator/(T scalar, mat<2, 3, T, P> const & m)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -435,13 +435,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]); return (m1[0] == m2[0]) && (m1[1] == m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<2, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]); return (m1[0] != m2[0]) || (m1[1] != m2[1]);

View File

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<2, 4, T, P> struct mat<2, 4, T, P>
{ {
typedef vec<4, T, P> col_type; typedef vec<4, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<2, 4, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<2, 4, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<2, 4, T, Q> const & m); GLM_FUNC_DECL mat(mat<2, 4, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -64,7 +64,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -105,59 +105,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m); GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m); GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m); GLM_FUNC_DECL mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m); GLM_FUNC_DECL typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2); GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m); GLM_FUNC_DECL mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat() GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -20,15 +20,15 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, Q> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
this->value[1] = m.value[1]; this->value[1] = m.value[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(T scalar)
{ {
value_type const Zero(0); value_type const Zero(0);
@ -36,7 +36,7 @@ namespace glm
this->value[1] = col_type(Zero, scalar, Zero, Zero); this->value[1] = col_type(Zero, scalar, Zero, Zero);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat
( (
T x0, T y0, T z0, T w0, T x0, T y0, T z0, T w0,
@ -47,7 +47,7 @@ namespace glm
this->value[1] = col_type(x1, y1, z1, w1); this->value[1] = col_type(x1, y1, z1, w1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(col_type const & v0, col_type const & v1) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(col_type const & v0, col_type const & v1)
{ {
this->value[0] = v0; this->value[0] = v0;
@ -56,7 +56,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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>
@ -70,7 +70,7 @@ 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));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename V1, typename V2> template<typename V1, typename V2>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(vec<4, V1, P> const & v1, vec<4, V2, P> const & v2)
{ {
@ -80,64 +80,64 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, U, Q> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 4, U, 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<2, 3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
this->value[1] = m[1]; this->value[1] = m[1];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
this->value[1] = col_type(m[1], 0, 0); this->value[1] = col_type(m[1], 0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -146,14 +146,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type const & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type const & mat<2, 4, T, P>::operator[](typename mat<2, 4, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -163,7 +163,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -172,7 +172,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator=(mat<2, 4, U, P> const & m)
{ {
@ -181,7 +181,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(U s)
{ {
@ -190,7 +190,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(mat<2, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator+=(mat<2, 4, U, P> const & m)
{ {
@ -199,7 +199,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(U s)
{ {
@ -208,7 +208,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(mat<2, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator-=(mat<2, 4, U, P> const & m)
{ {
@ -217,7 +217,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator*=(U s)
{ {
@ -226,7 +226,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> & mat<2, 4, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<2, 4, T, P> & mat<2, 4, T, P>::operator/=(U s)
{ {
@ -237,7 +237,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator++() GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -245,7 +245,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator--() GLM_FUNC_QUALIFIER mat<2, 4, T, P>& mat<2, 4, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -253,7 +253,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator++(int)
{ {
mat<2, 4, T, P> Result(*this); mat<2, 4, T, P> Result(*this);
@ -261,7 +261,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat<2, 4, T, P>::operator--(int)
{ {
mat<2, 4, T, P> Result(*this); mat<2, 4, T, P> Result(*this);
@ -271,13 +271,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -287,7 +287,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m, T scalar)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -295,7 +295,7 @@ namespace glm
m[1] + scalar); m[1] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator+(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -303,7 +303,7 @@ namespace glm
m1[1] + m2[1]); m1[1] + m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m, T scalar)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -311,7 +311,7 @@ namespace glm
m[1] - scalar); m[1] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator-(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -319,7 +319,7 @@ namespace glm
m1[1] - m2[1]); m1[1] - m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m, T scalar)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -327,7 +327,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(T scalar, mat<2, 4, T, P> const & m)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -335,7 +335,7 @@ namespace glm
m[1] * scalar); m[1] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::col_type operator*(mat<2, 4, T, P> const & m, typename mat<2, 4, T, P>::row_type const & v)
{ {
return typename mat<2, 4, T, P>::col_type( return typename mat<2, 4, T, P>::col_type(
@ -345,7 +345,7 @@ namespace glm
m[0][3] * v.x + m[1][3] * v.y); m[0][3] * v.x + m[1][3] * v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<2, 4, T, P>::row_type operator*(typename mat<2, 4, T, P>::col_type const & v, mat<2, 4, T, P> const & m)
{ {
return typename mat<2, 4, T, P>::row_type( return typename mat<2, 4, T, P>::row_type(
@ -353,7 +353,7 @@ namespace glm
v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]); v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
T SrcA00 = m1[0][0]; T SrcA00 = m1[0][0];
@ -394,7 +394,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<2, 2, T, P> const & m2)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -408,7 +408,7 @@ namespace glm
m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]); m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<2, 4, T, P> const & m1, mat<3, 2, T, P> const & m2)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(mat<2, 4, T, P> const & m, T scalar)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -434,7 +434,7 @@ namespace glm
m[1] / scalar); m[1] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator/(T scalar, mat<2, 4, T, P> const & m)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -444,13 +444,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]); return (m1[0] == m2[0]) && (m1[1] == m2[1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<2, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]); return (m1[0] != m2[0]) || (m1[1] != m2[1]);

View File

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<3, 2, T, P> struct mat<3, 2, T, P>
{ {
typedef vec<2, T, P> col_type; typedef vec<2, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<3, 2, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<3, 2, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<3, 2, T, Q> const & m); GLM_FUNC_DECL mat(mat<3, 2, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -69,7 +69,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -110,59 +110,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m); GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m); GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m); GLM_FUNC_DECL mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m); GLM_FUNC_DECL typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m); GLM_FUNC_DECL mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat() GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -21,8 +21,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -30,7 +30,7 @@ namespace glm
this->value[2] = m.value[2]; this->value[2] = m.value[2];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
@ -38,7 +38,7 @@ namespace glm
this->value[2] = col_type(0, 0); this->value[2] = col_type(0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
( (
T x0, T y0, T x0, T y0,
@ -51,7 +51,7 @@ namespace glm
this->value[2] = col_type(x2, y2); this->value[2] = col_type(x2, y2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -66,7 +66,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
template< template<
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
@ -83,7 +83,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));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat
( (
@ -99,8 +99,8 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, U, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 2, U, Q> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -108,7 +108,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -116,7 +116,7 @@ namespace glm
this->value[2] = col_type(0); this->value[2] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -124,7 +124,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -132,7 +132,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -140,7 +140,7 @@ namespace glm
this->value[2] = col_type(T(0)); this->value[2] = col_type(T(0));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -148,7 +148,7 @@ namespace glm
this->value[2] = col_type(T(0)); this->value[2] = col_type(T(0));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -156,7 +156,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -164,7 +164,7 @@ namespace glm
this->value[2] = m[2]; this->value[2] = m[2];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -174,14 +174,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type const & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type const & mat<3, 2, T, P>::operator[](typename mat<3, 2, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -191,7 +191,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -201,7 +201,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator=(mat<3, 2, U, P> const & m)
{ {
@ -211,7 +211,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(U s)
{ {
@ -221,7 +221,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(mat<3, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator+=(mat<3, 2, U, P> const & m)
{ {
@ -231,7 +231,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(U s)
{ {
@ -241,7 +241,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(mat<3, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator-=(mat<3, 2, U, P> const & m)
{ {
@ -251,7 +251,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator*=(U s)
{ {
@ -261,7 +261,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> & mat<3, 2, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<3, 2, T, P> & mat<3, 2, T, P>::operator/=(U s)
{ {
@ -273,7 +273,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator++() GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -282,7 +282,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator--() GLM_FUNC_QUALIFIER mat<3, 2, T, P>& mat<3, 2, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -291,7 +291,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator++(int)
{ {
mat<3, 2, T, P> Result(*this); mat<3, 2, T, P> Result(*this);
@ -299,7 +299,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<3, 2, T, P> mat<3, 2, T, P>::operator--(int)
{ {
mat<3, 2, T, P> Result(*this); mat<3, 2, T, P> Result(*this);
@ -309,13 +309,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -326,7 +326,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m, T scalar)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -335,7 +335,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator+(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -344,7 +344,7 @@ namespace glm
m1[2] + m2[2]); m1[2] + m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m, T scalar)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -353,7 +353,7 @@ namespace glm
m[2] - scalar); m[2] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator-(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -362,7 +362,7 @@ namespace glm
m1[2] - m2[2]); m1[2] - m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m, T scalar)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -371,7 +371,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(T scalar, mat<3, 2, T, P> const & m)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -380,7 +380,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::col_type operator*(mat<3, 2, T, P> const & m, typename mat<3, 2, T, P>::row_type const & v)
{ {
return typename mat<3, 2, T, P>::col_type( return typename mat<3, 2, T, P>::col_type(
@ -388,7 +388,7 @@ namespace glm
m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z); m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<3, 2, T, P>::row_type operator*(typename mat<3, 2, T, P>::col_type const & v, mat<3, 2, T, P> const & m)
{ {
return typename mat<3, 2, T, P>::row_type( return typename mat<3, 2, T, P>::row_type(
@ -397,7 +397,7 @@ namespace glm
v.x * m[2][0] + v.y * m[2][1]); v.x * m[2][0] + v.y * m[2][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
const T SrcA00 = m1[0][0]; const T SrcA00 = m1[0][0];
@ -422,7 +422,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -434,7 +434,7 @@ namespace glm
m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]); m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<3, 2, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -448,7 +448,7 @@ namespace glm
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]); m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(mat<3, 2, T, P> const & m, T scalar)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -457,7 +457,7 @@ namespace glm
m[2] / scalar); m[2] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator/(T scalar, mat<3, 2, T, P> const & m)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -468,13 +468,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> 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]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<3, 2, T, P> const & m1, mat<3, 2, T, P> 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

@ -11,7 +11,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<3, 3, T, P> struct mat<3, 3, T, P>
{ {
typedef vec<3, T, P> col_type; typedef vec<3, T, P> col_type;
@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<3, 3, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<3, 3, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<3, 3, T, Q> const & m); GLM_FUNC_DECL mat(mat<3, 3, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -68,7 +68,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -113,74 +113,74 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m); GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m); GLM_FUNC_DECL mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m); GLM_FUNC_DECL typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -8,13 +8,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat() GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -23,8 +23,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -32,7 +32,7 @@ namespace glm
this->value[2] = m.value[2]; this->value[2] = m.value[2];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0); this->value[0] = col_type(scalar, 0, 0);
@ -40,7 +40,7 @@ namespace glm
this->value[2] = col_type(0, 0, scalar); this->value[2] = col_type(0, 0, scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
( (
T x0, T y0, T z0, T x0, T y0, T z0,
@ -53,7 +53,7 @@ namespace glm
this->value[2] = col_type(x2, y2, z2); this->value[2] = col_type(x2, y2, z2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -68,7 +68,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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,
@ -85,7 +85,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));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat
( (
@ -101,8 +101,8 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, U, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 3, U, Q> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -110,7 +110,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -118,7 +118,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1); this->value[2] = col_type(0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -126,7 +126,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -134,7 +134,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1); this->value[2] = col_type(0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -142,7 +142,7 @@ namespace glm
this->value[2] = col_type(m[2], 1); this->value[2] = col_type(m[2], 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -150,7 +150,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1); this->value[2] = col_type(0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -158,7 +158,7 @@ namespace glm
this->value[2] = col_type(m[2], 1); this->value[2] = col_type(m[2], 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -166,7 +166,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -176,14 +176,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type const & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type const & mat<3, 3, T, P>::operator[](typename mat<3, 3, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -193,7 +193,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -203,7 +203,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator=(mat<3, 3, U, P> const & m)
{ {
@ -213,7 +213,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(U s)
{ {
@ -223,7 +223,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(mat<3, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator+=(mat<3, 3, U, P> const & m)
{ {
@ -233,7 +233,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(U s)
{ {
@ -243,7 +243,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(mat<3, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator-=(mat<3, 3, U, P> const & m)
{ {
@ -253,7 +253,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(U s)
{ {
@ -263,14 +263,14 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(mat<3, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator*=(mat<3, 3, U, P> const & m)
{ {
return (*this = *this * m); return (*this = *this * m);
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(U s)
{ {
@ -280,7 +280,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(mat<3, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator/=(mat<3, 3, U, P> const & m)
{ {
@ -289,7 +289,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator++() GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -298,7 +298,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator--() GLM_FUNC_QUALIFIER mat<3, 3, T, P> & mat<3, 3, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -307,7 +307,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator++(int)
{ {
mat<3, 3, T, P> Result(*this); mat<3, 3, T, P> Result(*this);
@ -315,7 +315,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat<3, 3, T, P>::operator--(int)
{ {
mat<3, 3, T, P> Result(*this); mat<3, 3, T, P> Result(*this);
@ -325,13 +325,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -342,7 +342,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m, T scalar)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -351,7 +351,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(T scalar, mat<3, 3, T, P> const & m)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -360,7 +360,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator+(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -369,7 +369,7 @@ namespace glm
m1[2] + m2[2]); m1[2] + m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m, T scalar)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -378,7 +378,7 @@ namespace glm
m[2] - scalar); m[2] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(T scalar, mat<3, 3, T, P> const & m)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -387,7 +387,7 @@ namespace glm
scalar - m[2]); scalar - m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator-(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -396,7 +396,7 @@ namespace glm
m1[2] - m2[2]); m1[2] - m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m, T scalar)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -405,7 +405,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(T scalar, mat<3, 3, T, P> const & m)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -414,7 +414,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator*(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v)
{ {
return typename mat<3, 3, T, P>::col_type( return typename mat<3, 3, T, P>::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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator*(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m)
{ {
return typename mat<3, 3, T, P>::row_type( return typename mat<3, 3, T, P>::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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
T const SrcA00 = m1[0][0]; T const SrcA00 = m1[0][0];
@ -468,7 +468,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -480,7 +480,7 @@ namespace glm
m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]); m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<3, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -498,7 +498,7 @@ namespace glm
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]); m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m, T scalar)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -507,7 +507,7 @@ namespace glm
m[2] / scalar); m[2] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(T scalar, mat<3, 3, T, P> const & m)
{ {
return mat<3, 3, T, P>( return mat<3, 3, T, P>(
@ -516,19 +516,19 @@ namespace glm
scalar / m[2]); scalar / m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::col_type operator/(mat<3, 3, T, P> const & m, typename mat<3, 3, T, P>::row_type const & v)
{ {
return inverse(m) * v; return inverse(m) * v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<3, 3, T, P>::row_type operator/(typename mat<3, 3, T, P>::col_type const & v, mat<3, 3, T, P> const & m)
{ {
return v * inverse(m); return v * inverse(m);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator/(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
mat<3, 3, T, P> m1_copy(m1); mat<3, 3, T, P> m1_copy(m1);
@ -537,13 +537,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> 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]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<3, 3, T, P> const & m1, mat<3, 3, T, P> 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

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<3, 4, T, P> struct mat<3, 4, T, P>
{ {
typedef vec<4, T, P> col_type; typedef vec<4, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<3, 4, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<3, 4, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<3, 4, T, Q> const & m); GLM_FUNC_DECL mat(mat<3, 4, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -69,7 +69,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -110,59 +110,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m); GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m); GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m); GLM_FUNC_DECL mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 4, T, P>::col_type operator*(mat<3, 4, T, P> const & m, typename mat<3, 4, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<3, 4, T, P>::col_type operator*(mat<3, 4, T, P> const & m, typename mat<3, 4, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<3, 4, T, P>::row_type operator*(typename mat<3, 4, T, P>::col_type const & v, mat<3, 4, T, P> const & m); GLM_FUNC_DECL typename mat<3, 4, T, P>::row_type operator*(typename mat<3, 4, T, P>::col_type const & v, mat<3, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<4, 3, T, P> const& m2); GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<4, 3, T, P> const& m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2); GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<3, 3, T, P> const& m2); GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<3, 3, T, P> const& m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m, T scalar); GLM_FUNC_DECL mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m); GLM_FUNC_DECL mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat() GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -21,8 +21,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -30,7 +30,7 @@ namespace glm
this->value[2] = m.value[2]; this->value[2] = m.value[2];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0, 0, 0); this->value[0] = col_type(scalar, 0, 0, 0);
@ -38,7 +38,7 @@ namespace glm
this->value[2] = col_type(0, 0, scalar, 0); this->value[2] = col_type(0, 0, scalar, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat
( (
T x0, T y0, T z0, T w0, T x0, T y0, T z0, T w0,
@ -51,7 +51,7 @@ namespace glm
this->value[2] = col_type(x2, y2, z2, w2); this->value[2] = col_type(x2, y2, z2, w2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -66,7 +66,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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,
@ -83,7 +83,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));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename V1, typename V2, typename V3> template<typename V1, typename V2, typename V3>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat
( (
@ -99,8 +99,8 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, U, Q> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 4, U, Q> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -108,7 +108,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -116,7 +116,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1, 0); this->value[2] = col_type(0, 0, 1, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -124,7 +124,7 @@ namespace glm
this->value[2] = col_type(m[2], 0); this->value[2] = col_type(m[2], 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -132,7 +132,7 @@ namespace glm
this->value[2] = col_type(m[2]); this->value[2] = col_type(m[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -140,7 +140,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1, 0); this->value[2] = col_type(0, 0, 1, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -148,7 +148,7 @@ namespace glm
this->value[2] = col_type(m[2], 1, 0); this->value[2] = col_type(m[2], 1, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -156,7 +156,7 @@ namespace glm
this->value[2] = col_type(0, 0, 1, 0); this->value[2] = col_type(0, 0, 1, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -164,7 +164,7 @@ namespace glm
this->value[2] = col_type(m[2], 1, 0); this->value[2] = col_type(m[2], 1, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -174,14 +174,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type const & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type const & mat<3, 4, T, P>::operator[](typename mat<3, 4, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -191,7 +191,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -201,7 +201,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator=(mat<3, 4, U, P> const & m)
{ {
@ -211,7 +211,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(U s)
{ {
@ -221,7 +221,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(mat<3, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator+=(mat<3, 4, U, P> const & m)
{ {
@ -231,7 +231,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(U s)
{ {
@ -241,7 +241,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(mat<3, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator-=(mat<3, 4, U, P> const & m)
{ {
@ -251,7 +251,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator*=(U s)
{ {
@ -261,7 +261,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> & mat<3, 4, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<3, 4, T, P> & mat<3, 4, T, P>::operator/=(U s)
{ {
@ -273,7 +273,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator++() GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -282,7 +282,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator--() GLM_FUNC_QUALIFIER mat<3, 4, T, P>& mat<3, 4, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -291,7 +291,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator++(int)
{ {
mat<3, 4, T, P> Result(*this); mat<3, 4, T, P> Result(*this);
@ -299,7 +299,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat<3, 4, T, P>::operator--(int)
{ {
mat<3, 4, T, P> Result(*this); mat<3, 4, T, P> Result(*this);
@ -309,13 +309,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -326,7 +326,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m, T scalar)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -335,7 +335,7 @@ namespace glm
m[2] + scalar); m[2] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator+(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -344,7 +344,7 @@ namespace glm
m1[2] + m2[2]); m1[2] + m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m, T scalar)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -353,7 +353,7 @@ namespace glm
m[2] - scalar); m[2] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator-(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -362,7 +362,7 @@ namespace glm
m1[2] - m2[2]); m1[2] - m2[2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m, T scalar)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -371,7 +371,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(T scalar, mat<3, 4, T, P> const & m)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -380,7 +380,7 @@ namespace glm
m[2] * scalar); m[2] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type operator* GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::col_type operator*
( (
mat<3, 4, T, P> const& m, mat<3, 4, T, P> const& m,
@ -394,7 +394,7 @@ namespace glm
m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z); m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::row_type operator* GLM_FUNC_QUALIFIER typename mat<3, 4, T, P>::row_type operator*
( (
typename mat<3, 4, T, P>::col_type const & v, typename mat<3, 4, T, P>::col_type const & v,
@ -407,7 +407,7 @@ namespace glm
v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]); v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
const T SrcA00 = m1[0][0]; const T SrcA00 = m1[0][0];
@ -456,7 +456,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<2, 3, T, P> const & m2)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -470,7 +470,7 @@ namespace glm
m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]); m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<3, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<3, 4, T, P> const & m1, mat<3, 3, T, P> const & m2)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -488,7 +488,7 @@ namespace glm
m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]); m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(mat<3, 4, T, P> const & m, T scalar)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -497,7 +497,7 @@ namespace glm
m[2] / scalar); m[2] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator/(T scalar, mat<3, 4, T, P> const & m)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -508,13 +508,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> 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]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<3, 4, T, P> const & m1, mat<3, 4, T, P> 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

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<4, 2, T, P> struct mat<4, 2, T, P>
{ {
typedef vec<2, T, P> col_type; typedef vec<2, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<4, 2, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<4, 2, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m); GLM_FUNC_DECL mat(mat<4, 2, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T scalar); GLM_FUNC_DECL explicit mat(T scalar);
@ -74,7 +74,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -115,59 +115,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m); GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m); GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const& m2); GLM_FUNC_DECL mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const& m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m); GLM_FUNC_DECL mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m); GLM_FUNC_DECL typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar); GLM_FUNC_DECL mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m); GLM_FUNC_DECL mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat() GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -22,8 +22,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, Q> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -32,7 +32,7 @@ namespace glm
this->value[3] = m.value[3]; this->value[3] = m.value[3];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(T scalar) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(T scalar)
{ {
this->value[0] = col_type(scalar, 0); this->value[0] = col_type(scalar, 0);
@ -41,7 +41,7 @@ namespace glm
this->value[3] = col_type(0, 0); this->value[3] = col_type(0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
( (
T x0, T y0, T x0, T y0,
@ -56,7 +56,7 @@ namespace glm
this->value[3] = col_type(x3, y3); this->value[3] = col_type(x3, y3);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -73,7 +73,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
template< template<
typename X1, typename Y1, typename X1, typename Y1,
typename X2, typename Y2, typename X2, typename Y2,
@ -93,7 +93,7 @@ namespace glm
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, precision P> template<typename T, qualifier P>
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, P>::mat GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat
( (
@ -111,8 +111,8 @@ namespace glm
// -- Conversion -- // -- Conversion --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, U, Q> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 2, U, Q> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -121,7 +121,7 @@ namespace glm
this->value[3] = col_type(m[3]); this->value[3] = col_type(m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -130,7 +130,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -139,7 +139,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -148,7 +148,7 @@ namespace glm
this->value[3] = col_type(m[3]); this->value[3] = col_type(m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -157,7 +157,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -166,7 +166,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -175,7 +175,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -184,7 +184,7 @@ namespace glm
this->value[3] = col_type(m[3]); this->value[3] = col_type(m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -195,14 +195,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type const & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type const & mat<4, 2, T, P>::operator[](typename mat<4, 2, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -212,7 +212,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -223,7 +223,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P>& mat<4, 2, T, P>::operator=(mat<4, 2, U, P> const & m)
{ {
@ -234,7 +234,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(U s)
{ {
@ -245,7 +245,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(mat<4, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator+=(mat<4, 2, U, P> const & m)
{ {
@ -256,7 +256,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(U s)
{ {
@ -267,7 +267,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(mat<4, 2, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator-=(mat<4, 2, U, P> const & m)
{ {
@ -278,7 +278,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator*=(U s)
{ {
@ -289,7 +289,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator/=(U s)
{ {
@ -302,7 +302,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator++() GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -312,7 +312,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator--() GLM_FUNC_QUALIFIER mat<4, 2, T, P> & mat<4, 2, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -322,7 +322,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator++(int)
{ {
mat<4, 2, T, P> Result(*this); mat<4, 2, T, P> Result(*this);
@ -330,7 +330,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<4, 2, T, P> mat<4, 2, T, P>::operator--(int)
{ {
mat<4, 2, T, P> Result(*this); mat<4, 2, T, P> Result(*this);
@ -340,13 +340,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -358,7 +358,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m, T scalar)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -368,7 +368,7 @@ namespace glm
m[3] + scalar); m[3] + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator+(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -378,7 +378,7 @@ namespace glm
m1[3] + m2[3]); m1[3] + m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m, T scalar)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -388,7 +388,7 @@ namespace glm
m[3] - scalar); m[3] - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator-(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -398,7 +398,7 @@ namespace glm
m1[3] - m2[3]); m1[3] - m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m, T scalar)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -408,7 +408,7 @@ namespace glm
m[3] * scalar); m[3] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(T scalar, mat<4, 2, T, P> const & m)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -418,7 +418,7 @@ namespace glm
m[3] * scalar); m[3] * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::col_type operator*(mat<4, 2, T, P> const & m, typename mat<4, 2, T, P>::row_type const & v)
{ {
return typename mat<4, 2, T, P>::col_type( return typename mat<4, 2, T, P>::col_type(
@ -426,7 +426,7 @@ namespace glm
m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w); m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<4, 2, T, P>::row_type operator*(typename mat<4, 2, T, P>::col_type const & v, mat<4, 2, T, P> const & m)
{ {
return typename mat<4, 2, T, P>::row_type( return typename mat<4, 2, T, P>::row_type(
@ -436,7 +436,7 @@ namespace glm
v.x * m[3][0] + v.y * m[3][1]); v.x * m[3][0] + v.y * m[3][1]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
T const SrcA00 = m1[0][0]; T const SrcA00 = m1[0][0];
@ -465,7 +465,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<3, 4, T, P> const & m2)
{ {
return mat<3, 2, T, P>( return mat<3, 2, T, P>(
@ -477,7 +477,7 @@ namespace glm
m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]); m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator*(mat<4, 2, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -491,7 +491,7 @@ namespace glm
m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]); m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(mat<4, 2, T, P> const & m, T scalar)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -501,7 +501,7 @@ namespace glm
m[3] / scalar); m[3] / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 2, T, P> operator/(T scalar, mat<4, 2, T, P> const & m)
{ {
return mat<4, 2, T, P>( return mat<4, 2, T, P>(
@ -513,13 +513,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<4, 2, T, P> const & m1, mat<4, 2, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);

View File

@ -12,7 +12,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<4, 3, T, P> struct mat<4, 3, T, P>
{ {
typedef vec<3, T, P> col_type; typedef vec<3, T, P> col_type;
@ -37,7 +37,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<4, 3, T, P> const & m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<4, 3, T, P> const & m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<4, 3, T, Q> const & m); GLM_FUNC_DECL mat(mat<4, 3, T, Q> const & m);
GLM_FUNC_DECL explicit mat(T const & x); GLM_FUNC_DECL explicit mat(T const & x);
@ -74,7 +74,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -115,59 +115,59 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m); GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m); GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m); GLM_FUNC_DECL mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 3, T, P>::col_type operator*(mat<4, 3, T, P> const & m, typename mat<4, 3, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<4, 3, T, P>::col_type operator*(mat<4, 3, T, P> const & m, typename mat<4, 3, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 3, T, P>::row_type operator*(typename mat<4, 3, T, P>::col_type const & v, mat<4, 3, T, P> const & m); GLM_FUNC_DECL typename mat<4, 3, T, P>::row_type operator*(typename mat<4, 3, T, P>::col_type const & v, mat<4, 3, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<3, 4, T, P> const& m2); GLM_FUNC_DECL mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<3, 4, T, P> const& m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m); GLM_FUNC_DECL mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -6,13 +6,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat() GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -22,8 +22,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, Q> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, T, Q> const & m)
{ {
this->value[0] = m.value[0]; this->value[0] = m.value[0];
@ -32,7 +32,7 @@ namespace glm
this->value[3] = m.value[3]; this->value[3] = m.value[3];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(T const & s) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(T const & s)
{ {
this->value[0] = col_type(s, 0, 0); this->value[0] = col_type(s, 0, 0);
@ -41,7 +41,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0); this->value[3] = col_type(0, 0, 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
( (
T const & x0, T const & y0, T const & z0, T const & x0, T const & y0, T const & z0,
@ -56,7 +56,7 @@ namespace glm
this->value[3] = col_type(x3, y3, z3); this->value[3] = col_type(x3, y3, z3);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -73,7 +73,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
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,
@ -93,7 +93,7 @@ namespace glm
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, precision P> template<typename T, qualifier P>
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, P>::mat GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat
( (
@ -111,8 +111,8 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, U, Q> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 3, U, Q> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -121,7 +121,7 @@ namespace glm
this->value[3] = col_type(m[3]); this->value[3] = col_type(m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -130,7 +130,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -139,7 +139,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -148,7 +148,7 @@ namespace glm
this->value[3] = col_type(m[3]); this->value[3] = col_type(m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -157,7 +157,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -166,7 +166,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -175,7 +175,7 @@ namespace glm
this->value[3] = col_type(0); this->value[3] = col_type(0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -184,7 +184,7 @@ namespace glm
this->value[3] = col_type(m[3], 0); this->value[3] = col_type(m[3], 0);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = col_type(m[0]); this->value[0] = col_type(m[0]);
@ -195,14 +195,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type const & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type const & mat<4, 3, T, P>::operator[](typename mat<4, 3, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -212,7 +212,7 @@ namespace glm
// -- Unary updatable operators -- // -- Unary updatable operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -223,7 +223,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P>& mat<4, 3, T, P>::operator=(mat<4, 3, U, P> const & m)
{ {
@ -234,7 +234,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(U s)
{ {
@ -245,7 +245,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(mat<4, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator+=(mat<4, 3, U, P> const & m)
{ {
@ -256,7 +256,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(U s)
{ {
@ -267,7 +267,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(mat<4, 3, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator-=(mat<4, 3, U, P> const & m)
{ {
@ -278,7 +278,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator*=(U s)
{ {
@ -289,7 +289,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator/=(U s)
{ {
@ -302,7 +302,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator++() GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -312,7 +312,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator--() GLM_FUNC_QUALIFIER mat<4, 3, T, P> & mat<4, 3, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -322,7 +322,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator++(int)
{ {
mat<4, 3, T, P> Result(*this); mat<4, 3, T, P> Result(*this);
@ -330,7 +330,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<4, 3, T, P> mat<4, 3, T, P>::operator--(int)
{ {
mat<4, 3, T, P> Result(*this); mat<4, 3, T, P> Result(*this);
@ -340,13 +340,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -358,7 +358,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m, T const & s)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -368,7 +368,7 @@ namespace glm
m[3] + s); m[3] + s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator+(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -378,7 +378,7 @@ namespace glm
m1[3] + m2[3]); m1[3] + m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m, T const & s)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -388,7 +388,7 @@ namespace glm
m[3] - s); m[3] - s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator-(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -398,7 +398,7 @@ namespace glm
m1[3] - m2[3]); m1[3] - m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m, T const & s)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -408,7 +408,7 @@ namespace glm
m[3] * s); m[3] * s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(T const & s, mat<4, 3, T, P> const & m)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -418,7 +418,7 @@ namespace glm
m[3] * s); m[3] * s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type operator* GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::col_type operator*
( (
mat<4, 3, T, P> const& m, mat<4, 3, T, P> const& m,
@ -430,7 +430,7 @@ namespace glm
m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w); m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::row_type operator* GLM_FUNC_QUALIFIER typename mat<4, 3, T, P>::row_type operator*
( (
typename mat<4, 3, T, P>::col_type const & v, typename mat<4, 3, T, P>::col_type const & v,
@ -443,7 +443,7 @@ namespace glm
v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]); v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return mat<2, 3, T, P>( return mat<2, 3, T, P>(
@ -455,7 +455,7 @@ namespace glm
m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]); m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<3, 4, T, P> const & m2)
{ {
T const SrcA00 = m1[0][0]; T const SrcA00 = m1[0][0];
@ -497,7 +497,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator*(mat<4, 3, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -515,7 +515,7 @@ namespace glm
m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]); m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(mat<4, 3, T, P> const & m, T const & s)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -525,7 +525,7 @@ namespace glm
m[3] / s); m[3] / s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 3, T, P> operator/(T const & s, mat<4, 3, T, P> const & m)
{ {
return mat<4, 3, T, P>( return mat<4, 3, T, P>(
@ -537,13 +537,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<4, 3, T, P> const & m1, mat<4, 3, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);

View File

@ -11,7 +11,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct mat<4, 4, T, P> struct mat<4, 4, T, P>
{ {
typedef vec<4, T, P> col_type; typedef vec<4, T, P> col_type;
@ -36,7 +36,7 @@ namespace glm
GLM_FUNC_DECL mat() GLM_DEFAULT; GLM_FUNC_DECL mat() GLM_DEFAULT;
GLM_FUNC_DECL mat(mat<4, 4, T, P> const& m) GLM_DEFAULT; GLM_FUNC_DECL mat(mat<4, 4, T, P> const& m) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL mat(mat<4, 4, T, Q> const& m); GLM_FUNC_DECL mat(mat<4, 4, T, Q> const& m);
GLM_FUNC_DECL explicit mat(T const & x); GLM_FUNC_DECL explicit mat(T const & x);
@ -73,7 +73,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, U, Q> const & m); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, U, Q> const & m);
GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x); GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const & x);
@ -118,74 +118,74 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const& m2); GLM_FUNC_DECL mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const& m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator*(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator*(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator*(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m); GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator*(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2); GLM_FUNC_DECL mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2); GLM_FUNC_DECL mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s); GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator/(T const & s, mat<4, 4, T, P> const & m); GLM_FUNC_DECL mat<4, 4, T, P> operator/(T const & s, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v); GLM_FUNC_DECL typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m); GLM_FUNC_DECL typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const& m2); GLM_FUNC_DECL mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const& m2);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2); GLM_FUNC_DECL bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2);
}//namespace glm }//namespace glm

View File

@ -8,13 +8,13 @@ namespace glm
// -- Constructors -- // -- Constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat() GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -24,8 +24,8 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, Q> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 4, T, Q> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -34,7 +34,7 @@ namespace glm
this->value[3] = m[3]; this->value[3] = m[3];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(T const & s) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(T const & s)
{ {
this->value[0] = col_type(s, 0, 0, 0); this->value[0] = col_type(s, 0, 0, 0);
@ -43,7 +43,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, s); this->value[3] = col_type(0, 0, 0, s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
( (
T const & x0, T const & y0, T const & z0, T const & w0, T const & x0, T const & y0, T const & z0, T const & w0,
@ -58,7 +58,7 @@ namespace glm
this->value[3] = col_type(x3, y3, z3, w3); this->value[3] = col_type(x3, y3, z3, w3);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
( (
col_type const & v0, col_type const & v0,
@ -73,8 +73,8 @@ namespace glm
this->value[3] = v3; this->value[3] = v3;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
( (
mat<4, 4, U, Q> const & m mat<4, 4, U, Q> const & m
@ -88,7 +88,7 @@ namespace glm
// -- Conversions -- // -- Conversions --
template<typename T, precision P> template<typename T, qualifier P>
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,
@ -128,7 +128,7 @@ namespace glm
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, precision P> template<typename T, qualifier P>
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, P>::mat GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat
( (
@ -151,7 +151,7 @@ namespace glm
// -- Matrix conversions -- // -- Matrix conversions --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -160,7 +160,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -169,7 +169,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -178,7 +178,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -187,7 +187,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<2, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -196,7 +196,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 2, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0, 0); this->value[0] = col_type(m[0], 0, 0);
@ -205,7 +205,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<3, 4, T, P> const & m)
{ {
this->value[0] = m[0]; this->value[0] = m[0];
@ -214,7 +214,7 @@ namespace glm
this->value[3] = col_type(0, 0, 0, 1); this->value[3] = col_type(0, 0, 0, 1);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat(mat<4, 3, T, P> const & m)
{ {
this->value[0] = col_type(m[0], 0); this->value[0] = col_type(m[0], 0);
@ -225,14 +225,14 @@ namespace glm
// -- Accesses -- // -- Accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i) GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i)
{ {
assert(i < this->length()); assert(i < this->length());
return this->value[i]; return this->value[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type const & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i) const GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type const & mat<4, 4, T, P>::operator[](typename mat<4, 4, T, P>::length_type i) const
{ {
assert(i < this->length()); assert(i < this->length());
@ -242,7 +242,7 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, T, P> const & m)
{ {
//memcpy could be faster //memcpy could be faster
@ -255,7 +255,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator=(mat<4, 4, U, P> const & m)
{ {
@ -268,7 +268,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(U s) GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(U s)
{ {
@ -279,7 +279,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(mat<4, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P>& mat<4, 4, T, P>::operator+=(mat<4, 4, U, P> const & m)
{ {
@ -290,7 +290,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(U s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(U s)
{ {
@ -301,7 +301,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(mat<4, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator-=(mat<4, 4, U, P> const & m)
{ {
@ -312,7 +312,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(U s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(U s)
{ {
@ -323,14 +323,14 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(mat<4, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator*=(mat<4, 4, U, P> const & m)
{ {
return (*this = *this * m); return (*this = *this * m);
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(U s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(U s)
{ {
@ -341,7 +341,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(mat<4, 4, U, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator/=(mat<4, 4, U, P> const & m)
{ {
@ -350,7 +350,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator++() GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator++()
{ {
++this->value[0]; ++this->value[0];
@ -360,7 +360,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator--() GLM_FUNC_QUALIFIER mat<4, 4, T, P> & mat<4, 4, T, P>::operator--()
{ {
--this->value[0]; --this->value[0];
@ -370,7 +370,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator++(int) GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator++(int)
{ {
mat<4, 4, T, P> Result(*this); mat<4, 4, T, P> Result(*this);
@ -378,7 +378,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator--(int) GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat<4, 4, T, P>::operator--(int)
{ {
mat<4, 4, T, P> Result(*this); mat<4, 4, T, P> Result(*this);
@ -388,13 +388,13 @@ namespace glm
// -- Unary constant operators -- // -- Unary constant operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m)
{ {
return m; return m;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -406,7 +406,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m, T const & s)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -416,7 +416,7 @@ namespace glm
m[3] + s); m[3] + s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(T const & s, mat<4, 4, T, P> const & m)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -426,7 +426,7 @@ namespace glm
m[3] + s); m[3] + s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator+(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -436,7 +436,7 @@ namespace glm
m1[3] + m2[3]); m1[3] + m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m, T const & s)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -446,7 +446,7 @@ namespace glm
m[3] - s); m[3] - s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(T const & s, mat<4, 4, T, P> const & m)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -456,7 +456,7 @@ namespace glm
s - m[3]); s - m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator-(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -466,7 +466,7 @@ namespace glm
m1[3] - m2[3]); m1[3] - m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m, T const & s)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -476,7 +476,7 @@ namespace glm
m[3] * s); m[3] * s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(T const & s, mat<4, 4, T, P> const & m)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -486,7 +486,7 @@ namespace glm
m[3] * s); m[3] * s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator* GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator*
( (
mat<4, 4, T, P> const& m, mat<4, 4, T, P> const& m,
@ -534,7 +534,7 @@ namespace glm
*/ */
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator* GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator*
( (
typename mat<4, 4, T, P>::col_type const & v, typename mat<4, 4, T, P>::col_type const & v,
@ -548,7 +548,7 @@ namespace glm
m[3][0] * v[0] + m[3][1] * v[1] + m[3][2] * v[2] + m[3][3] * v[3]); m[3][0] * v[0] + m[3][1] * v[1] + m[3][2] * v[2] + m[3][3] * v[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<2, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<2, 4, T, P> const & m2)
{ {
return mat<2, 4, T, P>( return mat<2, 4, T, P>(
@ -562,7 +562,7 @@ namespace glm
m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]); m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<3, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<3, 4, T, P> const & m2)
{ {
return mat<3, 4, T, P>( return mat<3, 4, T, P>(
@ -580,7 +580,7 @@ namespace glm
m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]); m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator*(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
typename mat<4, 4, T, P>::col_type const SrcA0 = m1[0]; typename mat<4, 4, T, P>::col_type const SrcA0 = m1[0];
@ -601,7 +601,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m, T const & s)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -611,7 +611,7 @@ namespace glm
m[3] / s); m[3] / s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(T const & s, mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(T const & s, mat<4, 4, T, P> const& m)
{ {
return mat<4, 4, T, P>( return mat<4, 4, T, P>(
@ -621,19 +621,19 @@ namespace glm
s / m[3]); s / m[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v) GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::col_type operator/(mat<4, 4, T, P> const & m, typename mat<4, 4, T, P>::row_type const & v)
{ {
return inverse(m) * v; return inverse(m) * v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER typename mat<4, 4, T, P>::row_type operator/(typename mat<4, 4, T, P>::col_type const & v, mat<4, 4, T, P> const & m)
{ {
return v * inverse(m); return v * inverse(m);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER mat<4, 4, T, P> operator/(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
mat<4, 4, T, P> m1_copy(m1); mat<4, 4, T, P> m1_copy(m1);
@ -642,13 +642,13 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator==(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2) GLM_FUNC_QUALIFIER bool operator!=(mat<4, 4, T, P> const & m1, mat<4, 4, T, P> const & m2)
{ {
return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);

View File

@ -3,7 +3,7 @@
#pragma once #pragma once
#include "precision.hpp" #include "qualifier.hpp"
#include "type_int.hpp" #include "type_int.hpp"
#include "compute_vector_relational.hpp" #include "compute_vector_relational.hpp"
@ -103,10 +103,10 @@ namespace detail
}//namespace detail }//namespace detail
#if GLM_HAS_TEMPLATE_ALIASES #if GLM_HAS_TEMPLATE_ALIASES
template <typename T, precision P = defaultp> using tvec1 = vec<1, T, P>; template <typename T, qualifier P = defaultp> using tvec1 = vec<1, T, P>;
template <typename T, precision P = defaultp> using tvec2 = vec<2, T, P>; template <typename T, qualifier P = defaultp> using tvec2 = vec<2, T, P>;
template <typename T, precision P = defaultp> using tvec3 = vec<3, T, P>; template <typename T, qualifier P = defaultp> using tvec3 = vec<3, T, P>;
template <typename T, precision P = defaultp> using tvec4 = vec<4, T, P>; template <typename T, qualifier P = defaultp> using tvec4 = vec<4, T, P>;
#endif//GLM_HAS_TEMPLATE_ALIASES #endif//GLM_HAS_TEMPLATE_ALIASES
typedef vec<1, float, highp> highp_vec1_t; typedef vec<1, float, highp> highp_vec1_t;
@ -128,106 +128,106 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 2 components vector of high single-precision floating-point numbers. /// 2 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, float, highp> highp_vec2; typedef vec<2, float, highp> highp_vec2;
/// 2 components vector of medium single-precision floating-point numbers. /// 2 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, float, mediump> mediump_vec2; typedef vec<2, float, mediump> mediump_vec2;
/// 2 components vector of low single-precision floating-point numbers. /// 2 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, float, lowp> lowp_vec2; typedef vec<2, float, lowp> lowp_vec2;
/// 2 components vector of high double-precision floating-point numbers. /// 2 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, double, highp> highp_dvec2; typedef vec<2, double, highp> highp_dvec2;
/// 2 components vector of medium double-precision floating-point numbers. /// 2 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, double, mediump> mediump_dvec2; typedef vec<2, double, mediump> mediump_dvec2;
/// 2 components vector of low double-precision floating-point numbers. /// 2 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, double, lowp> lowp_dvec2; typedef vec<2, double, lowp> lowp_dvec2;
/// 2 components vector of high precision signed integer numbers. /// 2 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, int, highp> highp_ivec2; typedef vec<2, int, highp> highp_ivec2;
/// 2 components vector of medium precision signed integer numbers. /// 2 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, int, mediump> mediump_ivec2; typedef vec<2, int, mediump> mediump_ivec2;
/// 2 components vector of low precision signed integer numbers. /// 2 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, int, lowp> lowp_ivec2; typedef vec<2, int, lowp> lowp_ivec2;
/// 2 components vector of high precision unsigned integer numbers. /// 2 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, uint, highp> highp_uvec2; typedef vec<2, uint, highp> highp_uvec2;
/// 2 components vector of medium precision unsigned integer numbers. /// 2 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, uint, mediump> mediump_uvec2; typedef vec<2, uint, mediump> mediump_uvec2;
/// 2 components vector of low precision unsigned integer numbers. /// 2 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, uint, lowp> lowp_uvec2; typedef vec<2, uint, lowp> lowp_uvec2;
/// 2 components vector of high precision bool numbers. /// 2 components vector of high qualifier bool numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, bool, highp> highp_bvec2; typedef vec<2, bool, highp> highp_bvec2;
/// 2 components vector of medium precision bool numbers. /// 2 components vector of medium qualifier bool numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<2, bool, mediump> mediump_bvec2; typedef vec<2, bool, mediump> mediump_bvec2;
/// 2 components vector of low precision bool numbers. /// 2 components vector of low qualifier bool numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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>
@ -238,103 +238,103 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 3 components vector of high single-precision floating-point numbers. /// 3 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, float, highp> highp_vec3; typedef vec<3, float, highp> highp_vec3;
/// 3 components vector of medium single-precision floating-point numbers. /// 3 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, float, mediump> mediump_vec3; typedef vec<3, float, mediump> mediump_vec3;
/// 3 components vector of low single-precision floating-point numbers. /// 3 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, float, lowp> lowp_vec3; typedef vec<3, float, lowp> lowp_vec3;
/// 3 components vector of high double-precision floating-point numbers. /// 3 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, double, highp> highp_dvec3; typedef vec<3, double, highp> highp_dvec3;
/// 3 components vector of medium double-precision floating-point numbers. /// 3 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, double, mediump> mediump_dvec3; typedef vec<3, double, mediump> mediump_dvec3;
/// 3 components vector of low double-precision floating-point numbers. /// 3 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, double, lowp> lowp_dvec3; typedef vec<3, double, lowp> lowp_dvec3;
/// 3 components vector of high precision signed integer numbers. /// 3 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, int, highp> highp_ivec3; typedef vec<3, int, highp> highp_ivec3;
/// 3 components vector of medium precision signed integer numbers. /// 3 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, int, mediump> mediump_ivec3; typedef vec<3, int, mediump> mediump_ivec3;
/// 3 components vector of low precision signed integer numbers. /// 3 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, int, lowp> lowp_ivec3; typedef vec<3, int, lowp> lowp_ivec3;
/// 3 components vector of high precision unsigned integer numbers. /// 3 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, uint, highp> highp_uvec3; typedef vec<3, uint, highp> highp_uvec3;
/// 3 components vector of medium precision unsigned integer numbers. /// 3 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, uint, mediump> mediump_uvec3; typedef vec<3, uint, mediump> mediump_uvec3;
/// 3 components vector of low precision unsigned integer numbers. /// 3 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, uint, lowp> lowp_uvec3; typedef vec<3, uint, lowp> lowp_uvec3;
/// 3 components vector of high precision bool numbers. /// 3 components vector of high qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, bool, highp> highp_bvec3; typedef vec<3, bool, highp> highp_bvec3;
/// 3 components vector of medium precision bool numbers. /// 3 components vector of medium qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<3, bool, mediump> mediump_bvec3; typedef vec<3, bool, mediump> mediump_bvec3;
/// 3 components vector of low precision bool numbers. /// 3 components vector of low qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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>
@ -345,91 +345,91 @@ namespace detail
/// @addtogroup core_precision /// @addtogroup core_precision
/// @{ /// @{
/// 4 components vector of high single-precision floating-point numbers. /// 4 components vector of high single-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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, float, highp> highp_vec4; typedef vec<4, float, highp> highp_vec4;
/// 4 components vector of medium single-precision floating-point numbers. /// 4 components vector of medium single-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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, float, mediump> mediump_vec4; typedef vec<4, float, mediump> mediump_vec4;
/// 4 components vector of low single-precision floating-point numbers. /// 4 components vector of low single-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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, float, lowp> lowp_vec4; typedef vec<4, float, lowp> lowp_vec4;
/// 4 components vector of high double-precision floating-point numbers. /// 4 components vector of high 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, double, highp> highp_dvec4; typedef vec<4, double, highp> highp_dvec4;
/// 4 components vector of medium double-precision floating-point numbers. /// 4 components vector of medium 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, double, mediump> mediump_dvec4; typedef vec<4, double, mediump> mediump_dvec4;
/// 4 components vector of low double-precision floating-point numbers. /// 4 components vector of low 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, double, lowp> lowp_dvec4; typedef vec<4, double, lowp> lowp_dvec4;
/// 4 components vector of high precision signed integer numbers. /// 4 components vector of high qualifier signed integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, int, highp> highp_ivec4; typedef vec<4, int, highp> highp_ivec4;
/// 4 components vector of medium precision signed integer numbers. /// 4 components vector of medium qualifier signed integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, int, mediump> mediump_ivec4; typedef vec<4, int, mediump> mediump_ivec4;
/// 4 components vector of low precision signed integer numbers. /// 4 components vector of low qualifier signed integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, int, lowp> lowp_ivec4; typedef vec<4, int, lowp> lowp_ivec4;
/// 4 components vector of high precision unsigned integer numbers. /// 4 components vector of high qualifier unsigned integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, uint, highp> highp_uvec4; typedef vec<4, uint, highp> highp_uvec4;
/// 4 components vector of medium precision unsigned integer numbers. /// 4 components vector of medium qualifier unsigned integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, uint, mediump> mediump_uvec4; typedef vec<4, uint, mediump> mediump_uvec4;
/// 4 components vector of low precision unsigned integer numbers. /// 4 components vector of low qualifier unsigned integer numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, uint, lowp> lowp_uvec4; typedef vec<4, uint, lowp> lowp_uvec4;
/// 4 components vector of high precision bool numbers. /// 4 components vector of high qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, bool, highp> highp_bvec4; typedef vec<4, bool, highp> highp_bvec4;
/// 4 components vector of medium precision bool numbers. /// 4 components vector of medium qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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 vec<4, bool, mediump> mediump_bvec4; typedef vec<4, bool, mediump> mediump_bvec4;
/// 4 components vector of low precision bool numbers. /// 4 components vector of low qualifier bool numbers.
/// ///
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</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>
@ -478,17 +478,17 @@ namespace detail
typedef mediump_dvec3 dvec3; typedef mediump_dvec3 dvec3;
typedef mediump_dvec4 dvec4; typedef mediump_dvec4 dvec4;
#else //defined(GLM_PRECISION_HIGHP_DOUBLE) #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 2 components vector of double-precision floating-point numbers. /// 2 components vector 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec2 dvec2; typedef highp_dvec2 dvec2;
//! 3 components vector of double-precision floating-point numbers. //! 3 components vector 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec3 dvec3; typedef highp_dvec3 dvec3;
//! 4 components vector of double-precision floating-point numbers. //! 4 components vector 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.5 Vectors</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
typedef highp_dvec4 dvec4; typedef highp_dvec4 dvec4;

View File

@ -16,7 +16,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct vec<1, T, P> struct vec<1, T, P>
{ {
// -- Implementation detail -- // -- Implementation detail --
@ -87,7 +87,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, T, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, T, Q> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
@ -97,17 +97,17 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<1, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<1, U, Q> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
@ -180,119 +180,119 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v); GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v); GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const& v); GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const& v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v1, vec<1, T, P> const& v2); GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v1, vec<1, T, P> const& v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const& v); GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const& v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator*(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator*(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator/(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator/(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator/(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator/(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator/(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator/(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator%(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator%(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator%(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator%(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator%(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator%(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator&(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator&(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator&(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator&(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator&(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator&(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator|(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator|(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator|(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator|(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator|(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator|(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator^(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator^(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator^(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator^(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator^(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator^(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator<<(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator<<(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator<<(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator<<(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator<<(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator<<(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator>>(vec<1, T, P> const & v, T scalar); GLM_FUNC_DECL vec<1, T, P> operator>>(vec<1, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator>>(T scalar, vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator>>(T scalar, vec<1, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator>>(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<1, T, P> operator>>(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<1, T, P> operator~(vec<1, T, P> const & v); GLM_FUNC_DECL vec<1, T, P> operator~(vec<1, T, P> const & v);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL bool operator==(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(vec<1, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL bool operator!=(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<1, bool, P> operator&&(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2); GLM_FUNC_DECL vec<1, bool, P> operator&&(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<1, bool, P> operator||(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2); GLM_FUNC_DECL vec<1, bool, P> operator||(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2);
}//namespace glm }//namespace glm

View File

@ -6,67 +6,67 @@ namespace glm
// -- Implicit basic constructors -- // -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec()
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, T, P> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, T, P> const & v)
: x(v.x) : x(v.x)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, T, Q> const& v)
: x(v.x) : x(v.x)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(T scalar)
: x(scalar) : x(scalar)
{} {}
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, U, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<1, U, Q> const & v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<2, U, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<2, U, Q> const & v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<3, U, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<3, U, Q> const & v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<4, U, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<1, T, P>::vec(vec<4, U, Q> const & v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
{} {}
// -- Component accesses -- // -- Component accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T & vec<1, T, P>::operator[](typename vec<1, T, P>::length_type i) GLM_FUNC_QUALIFIER T & vec<1, T, P>::operator[](typename vec<1, T, P>::length_type i)
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
return (&x)[i]; return (&x)[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const & vec<1, T, P>::operator[](typename vec<1, T, P>::length_type i) const GLM_FUNC_QUALIFIER T const & vec<1, T, P>::operator[](typename vec<1, T, P>::length_type i) const
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
@ -76,7 +76,7 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator=(vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator=(vec<1, T, P> const & v)
{ {
this->x = v.x; this->x = v.x;
@ -84,7 +84,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator=(vec<1, U, P> const & v)
{ {
@ -92,7 +92,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator+=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator+=(U scalar)
{ {
@ -100,7 +100,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator+=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator+=(vec<1, U, P> const & v)
{ {
@ -108,7 +108,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator-=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator-=(U scalar)
{ {
@ -116,7 +116,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator-=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator-=(vec<1, U, P> const & v)
{ {
@ -124,7 +124,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator*=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator*=(U scalar)
{ {
@ -132,7 +132,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator*=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator*=(vec<1, U, P> const & v)
{ {
@ -140,7 +140,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator/=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator/=(U scalar)
{ {
@ -148,7 +148,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator/=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator/=(vec<1, U, P> const & v)
{ {
@ -158,21 +158,21 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator++() GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator++()
{ {
++this->x; ++this->x;
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator--() GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator--()
{ {
--this->x; --this->x;
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> vec<1, T, P>::operator++(int) GLM_FUNC_QUALIFIER vec<1, T, P> vec<1, T, P>::operator++(int)
{ {
vec<1, T, P> Result(*this); vec<1, T, P> Result(*this);
@ -180,7 +180,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> vec<1, T, P>::operator--(int) GLM_FUNC_QUALIFIER vec<1, T, P> vec<1, T, P>::operator--(int)
{ {
vec<1, T, P> Result(*this); vec<1, T, P> Result(*this);
@ -190,7 +190,7 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator%=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator%=(U scalar)
{ {
@ -198,7 +198,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator%=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator%=(vec<1, U, P> const & v)
{ {
@ -206,7 +206,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator&=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator&=(U scalar)
{ {
@ -214,7 +214,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator&=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator&=(vec<1, U, P> const & v)
{ {
@ -222,7 +222,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator|=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator|=(U scalar)
{ {
@ -230,7 +230,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator|=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator|=(vec<1, U, P> const & v)
{ {
@ -238,7 +238,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator^=(U scalar)
{ {
@ -246,7 +246,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator^=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator^=(vec<1, U, P> const & v)
{ {
@ -254,7 +254,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator<<=(U scalar)
{ {
@ -262,7 +262,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator<<=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator<<=(vec<1, U, P> const & v)
{ {
@ -270,7 +270,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator>>=(U scalar)
{ {
@ -278,7 +278,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator>>=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> & vec<1, T, P>::operator>>=(vec<1, U, P> const & v)
{ {
@ -288,13 +288,13 @@ namespace glm
// -- Unary constant operators -- // -- Unary constant operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v)
{ {
return v; return v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
@ -303,21 +303,21 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x + scalar); v.x + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator+(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator+(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar + v.x); scalar + v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator+(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
@ -325,63 +325,63 @@ namespace glm
} }
//operator- //operator-
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x - scalar); v.x - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator-(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator-(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar - v.x); scalar - v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator-(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x - v2.x); v1.x - v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x * scalar); v.x * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator*(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator*(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar * v.x); scalar * v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator*(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator*(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x * v2.x); v1.x * v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator/(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator/(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x / scalar); v.x / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator/(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator/(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar / v.x); scalar / v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator/(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator/(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
@ -390,133 +390,133 @@ namespace glm
// -- Binary bit operators -- // -- Binary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator%(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator%(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x % scalar); v.x % scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator%(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator%(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar % v.x); scalar % v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator%(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator%(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x % v2.x); v1.x % v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator&(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator&(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x & scalar); v.x & scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator&(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator&(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar & v.x); scalar & v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator&(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator&(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x & v2.x); v1.x & v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator|(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator|(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x | scalar); v.x | scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator|(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator|(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar | v.x); scalar | v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator|(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator|(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x | v2.x); v1.x | v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator^(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator^(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x ^ scalar); v.x ^ scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator^(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator^(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar ^ v.x); scalar ^ v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator^(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator^(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x ^ v2.x); v1.x ^ v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
static_cast<T>(v.x << scalar)); static_cast<T>(v.x << scalar));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar << v.x); scalar << v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator<<(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x << v2.x); v1.x << v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(vec<1, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(vec<1, T, P> const & v, T scalar)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v.x >> scalar); v.x >> scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(T scalar, vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(T scalar, vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
scalar >> v.x); scalar >> v.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<1, T, P> operator>>(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<1, T, P>( return vec<1, T, P>(
v1.x >> v2.x); v1.x >> v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<1, T, P> operator~(vec<1, T, P> const & v) GLM_FUNC_QUALIFIER vec<1, T, P> operator~(vec<1, T, P> const & v)
{ {
return vec<1, T, P>( return vec<1, T, P>(
@ -525,25 +525,25 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator==(vec<1, T, P> const & v1, vec<1, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(vec<1, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator!=(vec<1, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return !(v1 == v2); return !(v1 == v2);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<1, bool, P> operator&&(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<1, bool, P> operator&&(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2)
{ {
return vec<1, bool, P>(v1.x && v2.x); return vec<1, bool, P>(v1.x && v2.x);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<1, bool, P> operator||(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<1, bool, P> operator||(vec<1, bool, P> const & v1, vec<1, bool, P> const & v2)
{ {
return vec<1, bool, P>(v1.x || v2.x); return vec<1, bool, P>(v1.x || v2.x);

View File

@ -15,7 +15,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct vec<2, T, P> struct vec<2, T, P>
{ {
// -- Implementation detail -- // -- Implementation detail --
@ -88,7 +88,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const& v) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, T, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, T, Q> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
@ -107,14 +107,14 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<2, U, Q> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
@ -206,179 +206,179 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator+(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator+(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator-(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator-(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator*(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator*(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator*(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator*(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator/(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator/(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator/(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator/(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator%(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator%(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator%(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator%(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator&(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator&(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator&(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator&(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator|(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator|(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator|(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator|(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator^(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator^(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator^(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator^(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator<<(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator<<(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator<<(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator<<(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v, T scalar); GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator>>(T scalar, vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator>>(T scalar, vec<2, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator>>(vec<1, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator>>(vec<1, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> operator~(vec<2, T, P> const & v); GLM_FUNC_DECL vec<2, T, P> operator~(vec<2, T, P> const & v);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL bool operator==(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(vec<2, T, P> const & v1, vec<2, T, P> const & v2); GLM_FUNC_DECL bool operator!=(vec<2, T, P> const & v1, vec<2, T, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<2, bool, P> operator&&(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2); GLM_FUNC_DECL vec<2, bool, P> operator&&(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<2, bool, P> operator||(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2); GLM_FUNC_DECL vec<2, bool, P> operator||(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2);
}//namespace glm }//namespace glm

View File

@ -6,46 +6,46 @@ namespace glm
// -- Implicit basic constructors -- // -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec()
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, T, P> const& v)
: x(v.x), y(v.y) : x(v.x), y(v.y)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, T, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, T, Q> const& v)
: x(v.x), y(v.y) : x(v.x), y(v.y)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T scalar)
: x(scalar), y(scalar) : x(scalar), y(scalar)
{} {}
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T _x, T _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(T _x, T _y)
: x(_x), y(_y) : x(_x), y(_y)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(A _x, B _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(A _x, B _y)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B> template<typename A, typename B>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<1, A, P> const& _x, vec<1, B, P> const& _y)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
@ -54,22 +54,22 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, U, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<2, U, Q> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<3, U, Q> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<4, U, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<2, T, P>::vec(vec<4, U, Q> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
@ -77,14 +77,14 @@ namespace glm
// -- Component accesses -- // -- Component accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T & vec<2, T, P>::operator[](typename vec<2, T, P>::length_type i) GLM_FUNC_QUALIFIER T & vec<2, T, P>::operator[](typename vec<2, T, P>::length_type i)
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
return (&x)[i]; return (&x)[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const & vec<2, T, P>::operator[](typename vec<2, T, P>::length_type i) const GLM_FUNC_QUALIFIER T const & vec<2, T, P>::operator[](typename vec<2, T, P>::length_type i) const
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
@ -94,7 +94,7 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, T, P> const& v)
{ {
this->x = v.x; this->x = v.x;
@ -103,7 +103,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator=(vec<2, U, P> const& v)
{ {
@ -112,7 +112,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(U scalar)
{ {
@ -121,7 +121,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<1, U, P> const& v)
{ {
@ -130,7 +130,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator+=(vec<2, U, P> const& v)
{ {
@ -139,7 +139,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(U scalar)
{ {
@ -148,7 +148,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<1, U, P> const& v)
{ {
@ -157,7 +157,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator-=(vec<2, U, P> const& v)
{ {
@ -166,7 +166,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(U scalar)
{ {
@ -175,7 +175,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<1, U, P> const& v)
{ {
@ -184,7 +184,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator*=(vec<2, U, P> const& v)
{ {
@ -193,7 +193,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(U scalar)
{ {
@ -202,7 +202,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<1, U, P> const& v)
{ {
@ -211,7 +211,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator/=(vec<2, U, P> const& v)
{ {
@ -222,7 +222,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator++() GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator++()
{ {
++this->x; ++this->x;
@ -230,7 +230,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator--() GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator--()
{ {
--this->x; --this->x;
@ -238,7 +238,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> vec<2, T, P>::operator++(int) GLM_FUNC_QUALIFIER vec<2, T, P> vec<2, T, P>::operator++(int)
{ {
vec<2, T, P> Result(*this); vec<2, T, P> Result(*this);
@ -246,7 +246,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> vec<2, T, P>::operator--(int) GLM_FUNC_QUALIFIER vec<2, T, P> vec<2, T, P>::operator--(int)
{ {
vec<2, T, P> Result(*this); vec<2, T, P> Result(*this);
@ -256,7 +256,7 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(U scalar)
{ {
@ -265,7 +265,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<1, U, P> const& v)
{ {
@ -274,7 +274,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator%=(vec<2, U, P> const& v)
{ {
@ -283,7 +283,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(U scalar)
{ {
@ -292,7 +292,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<1, U, P> const& v)
{ {
@ -301,7 +301,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator&=(vec<2, U, P> const& v)
{ {
@ -310,7 +310,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(U scalar)
{ {
@ -319,7 +319,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<1, U, P> const& v)
{ {
@ -328,7 +328,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator|=(vec<2, U, P> const& v)
{ {
@ -337,7 +337,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(U scalar)
{ {
@ -346,7 +346,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<1, U, P> const& v)
{ {
@ -355,7 +355,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator^=(vec<2, U, P> const& v)
{ {
@ -364,7 +364,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(U scalar)
{ {
@ -373,7 +373,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<1, U, P> const& v)
{ {
@ -382,7 +382,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator<<=(vec<2, U, P> const& v)
{ {
@ -391,7 +391,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(U scalar)
{ {
@ -400,7 +400,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<1, U, P> const& v)
{ {
@ -409,7 +409,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<2, U, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> & vec<2, T, P>::operator>>=(vec<2, U, P> const& v)
{ {
@ -420,13 +420,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v)
{ {
return v; return v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const& v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -436,7 +436,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -444,7 +444,7 @@ namespace glm
v.y + scalar); v.y + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v1, vec<1, T, P> const& v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const& v1, vec<1, T, P> const& v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -452,7 +452,7 @@ namespace glm
v1.y + v2.x); v1.y + v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(T scalar, vec<2, T, P> const& v) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(T scalar, vec<2, T, P> const& v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -460,7 +460,7 @@ namespace glm
scalar + v.y); scalar + v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<1, T, P> const& v1, vec<2, T, P> const& v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<1, T, P> const& v1, vec<2, T, P> const& v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -468,7 +468,7 @@ namespace glm
v1.x + v2.y); v1.x + v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator+(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -476,7 +476,7 @@ namespace glm
v1.y + v2.y); v1.y + v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -484,7 +484,7 @@ namespace glm
v.y - scalar); v.y - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -492,7 +492,7 @@ namespace glm
v1.y - v2.x); v1.y - v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -500,7 +500,7 @@ namespace glm
scalar - v.y); scalar - v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -508,7 +508,7 @@ namespace glm
v1.x - v2.y); v1.x - v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator-(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -516,7 +516,7 @@ namespace glm
v1.y - v2.y); v1.y - v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -524,7 +524,7 @@ namespace glm
v.y * scalar); v.y * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -532,7 +532,7 @@ namespace glm
v1.y * v2.x); v1.y * v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator*(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator*(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -540,7 +540,7 @@ namespace glm
scalar * v.y); scalar * v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -548,7 +548,7 @@ namespace glm
v1.x * v2.y); v1.x * v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator*(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -556,7 +556,7 @@ namespace glm
v1.y * v2.y); v1.y * v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -564,7 +564,7 @@ namespace glm
v.y / scalar); v.y / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -572,7 +572,7 @@ namespace glm
v1.y / v2.x); v1.y / v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator/(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator/(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -580,7 +580,7 @@ namespace glm
scalar / v.y); scalar / v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -588,7 +588,7 @@ namespace glm
v1.x / v2.y); v1.x / v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator/(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -598,7 +598,7 @@ namespace glm
// -- Binary bit operators -- // -- Binary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -606,7 +606,7 @@ namespace glm
v.y % scalar); v.y % scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -614,7 +614,7 @@ namespace glm
v1.y % v2.x); v1.y % v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator%(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator%(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -622,7 +622,7 @@ namespace glm
scalar % v.y); scalar % v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -630,7 +630,7 @@ namespace glm
v1.x % v2.y); v1.x % v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator%(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -638,7 +638,7 @@ namespace glm
v1.y % v2.y); v1.y % v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -646,7 +646,7 @@ namespace glm
v.y & scalar); v.y & scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -654,7 +654,7 @@ namespace glm
v1.y & v2.x); v1.y & v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator&(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator&(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -662,7 +662,7 @@ namespace glm
scalar & v.y); scalar & v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -670,7 +670,7 @@ namespace glm
v1.x & v2.y); v1.x & v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator&(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -678,7 +678,7 @@ namespace glm
v1.y & v2.y); v1.y & v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -686,7 +686,7 @@ namespace glm
v.y | scalar); v.y | scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -694,7 +694,7 @@ namespace glm
v1.y | v2.x); v1.y | v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator|(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator|(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -702,7 +702,7 @@ namespace glm
scalar | v.y); scalar | v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -710,7 +710,7 @@ namespace glm
v1.x | v2.y); v1.x | v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator|(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -718,7 +718,7 @@ namespace glm
v1.y | v2.y); v1.y | v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -726,7 +726,7 @@ namespace glm
v.y ^ scalar); v.y ^ scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -734,7 +734,7 @@ namespace glm
v1.y ^ v2.x); v1.y ^ v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator^(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator^(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -742,7 +742,7 @@ namespace glm
scalar ^ v.y); scalar ^ v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -750,7 +750,7 @@ namespace glm
v1.x ^ v2.y); v1.x ^ v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator^(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -758,7 +758,7 @@ namespace glm
v1.y ^ v2.y); v1.y ^ v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -766,7 +766,7 @@ namespace glm
v.y << scalar); v.y << scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -774,7 +774,7 @@ namespace glm
v1.y << v2.x); v1.y << v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -782,7 +782,7 @@ namespace glm
scalar << v.y); scalar << v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -790,7 +790,7 @@ namespace glm
v1.x << v2.y); v1.x << v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator<<(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -798,7 +798,7 @@ namespace glm
v1.y << v2.y); v1.y << v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v, T scalar)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -806,7 +806,7 @@ namespace glm
v.y >> scalar); v.y >> scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -814,7 +814,7 @@ namespace glm
v1.y >> v2.x); v1.y >> v2.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(T scalar, vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(T scalar, vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -822,7 +822,7 @@ namespace glm
scalar >> v.y); scalar >> v.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<1, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<1, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -830,7 +830,7 @@ namespace glm
v1.x >> v2.y); v1.x >> v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER vec<2, T, P> operator>>(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -838,7 +838,7 @@ namespace glm
v1.y >> v2.y); v1.y >> v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> operator~(vec<2, T, P> const & v) GLM_FUNC_QUALIFIER vec<2, T, P> operator~(vec<2, T, P> const & v)
{ {
return vec<2, T, P>( return vec<2, T, P>(
@ -848,7 +848,7 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator==(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return return
@ -856,19 +856,19 @@ namespace glm
detail::compute_equal<T>::call(v1.y, v2.y); detail::compute_equal<T>::call(v1.y, v2.y);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(vec<2, T, P> const & v1, vec<2, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator!=(vec<2, T, P> const & v1, vec<2, T, P> const & v2)
{ {
return !(v1 == v2); return !(v1 == v2);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<2, bool, P> operator&&(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<2, bool, P> operator&&(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2)
{ {
return vec<2, bool, P>(v1.x && v2.x, v1.y && v2.y); return vec<2, bool, P>(v1.x && v2.x, v1.y && v2.y);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<2, bool, P> operator||(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<2, bool, P> operator||(vec<2, bool, P> const & v1, vec<2, bool, P> const & v2)
{ {
return vec<2, bool, P>(v1.x || v2.x, v1.y || v2.y); return vec<2, bool, P>(v1.x || v2.x, v1.y || v2.y);

View File

@ -15,7 +15,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct vec<3, T, P> struct vec<3, T, P>
{ {
// -- Implementation detail -- // -- Implementation detail --
@ -88,7 +88,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const & v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec const & v) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, T, Q> const & v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, T, Q> const & v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
@ -107,23 +107,23 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, B _z); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, B _z);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, Q> const& _yz); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, Q> const& _yz);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<3, U, Q> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
@ -227,179 +227,179 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator+(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator+(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator+(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator-(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator-(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator*(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator*(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator/(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator/(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator/(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator/(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator%(T const & scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator%(T const & scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator%(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator%(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, T scalar); GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator&(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator&(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator&(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator&(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator|(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator|(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator|(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator|(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator^(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator^(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator^(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator^(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator<<(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator<<(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator<<(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator<<(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v, T scalar); GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator>>(T scalar, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator>>(T scalar, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator>>(vec<1, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator>>(vec<1, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator~(vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator~(vec<3, T, P> const & v);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL bool operator==(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(vec<3, T, P> const & v1, vec<3, T, P> const & v2); GLM_FUNC_DECL bool operator!=(vec<3, T, P> const & v1, vec<3, T, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<3, bool, P> operator&&(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2); GLM_FUNC_DECL vec<3, bool, P> operator&&(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<3, bool, P> operator||(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2); GLM_FUNC_DECL vec<3, bool, P> operator||(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2);
}//namespace glm }//namespace glm

View File

@ -6,39 +6,39 @@ namespace glm
// -- Implicit basic constructors -- // -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec()
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, T, P> const & v)
: x(v.x), y(v.y), z(v.z) : x(v.x), y(v.y), z(v.z)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, T, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, T, Q> const & v)
: x(v.x), y(v.y), z(v.z) : x(v.x), y(v.y), z(v.z)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T scalar)
: x(scalar), y(scalar), z(scalar) : x(scalar), y(scalar), z(scalar)
{} {}
template <typename T, precision P> template <typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T _x, T _y, T _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(T _x, T _y, T _z)
: x(_x), y(_y), z(_z) : x(_x), y(_y), z(_z)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(X _x, Y _y, Z _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(X _x, Y _y, Z _z)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
@ -46,7 +46,7 @@ namespace glm
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename X, typename Y, typename Z> template<typename X, typename Y, typename Z>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
@ -56,48 +56,48 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, B _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, B _z)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z)) , z(static_cast<T>(_z))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
, z(static_cast<T>(_z.x)) , z(static_cast<T>(_z.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(A _x, vec<2, B, Q> const& _yz) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(A _x, vec<2, B, Q> const& _yz)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
, z(static_cast<T>(_yz.y)) , z(static_cast<T>(_yz.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, U, Q> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<3, U, Q> const& v)
: x(static_cast<T>(v.x)) : x(static_cast<T>(v.x))
, y(static_cast<T>(v.y)) , y(static_cast<T>(v.y))
, z(static_cast<T>(v.z)) , z(static_cast<T>(v.z))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<4, U, Q> const& v) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<3, T, P>::vec(vec<4, U, Q> const& v) :
x(static_cast<T>(v.x)), x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)), y(static_cast<T>(v.y)),
@ -106,14 +106,14 @@ namespace glm
// -- Component accesses -- // -- Component accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T & vec<3, T, P>::operator[](typename vec<3, T, P>::length_type i) GLM_FUNC_QUALIFIER T & vec<3, T, P>::operator[](typename vec<3, T, P>::length_type i)
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
return (&x)[i]; return (&x)[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const & vec<3, T, P>::operator[](typename vec<3, T, P>::length_type i) const GLM_FUNC_QUALIFIER T const & vec<3, T, P>::operator[](typename vec<3, T, P>::length_type i) const
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
@ -123,7 +123,7 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P>& vec<3, T, P>::operator=(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P>& vec<3, T, P>::operator=(vec<3, T, P> const & v)
{ {
this->x = v.x; this->x = v.x;
@ -133,7 +133,7 @@ namespace glm
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P>& vec<3, T, P>::operator=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P>& vec<3, T, P>::operator=(vec<3, U, P> const & v)
{ {
@ -143,7 +143,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(U scalar)
{ {
@ -153,7 +153,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(vec<1, U, P> const & v)
{ {
@ -163,7 +163,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator+=(vec<3, U, P> const & v)
{ {
@ -173,7 +173,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(U scalar)
{ {
@ -183,7 +183,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(vec<1, U, P> const & v)
{ {
@ -193,7 +193,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator-=(vec<3, U, P> const & v)
{ {
@ -203,7 +203,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(U scalar)
{ {
@ -213,7 +213,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(vec<1, U, P> const & v)
{ {
@ -223,7 +223,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator*=(vec<3, U, P> const & v)
{ {
@ -233,7 +233,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(U v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(U v)
{ {
@ -243,7 +243,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(vec<1, U, P> const & v)
{ {
@ -253,7 +253,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator/=(vec<3, U, P> const & v)
{ {
@ -265,7 +265,7 @@ namespace glm
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator++() GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator++()
{ {
++this->x; ++this->x;
@ -274,7 +274,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator--() GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator--()
{ {
--this->x; --this->x;
@ -283,7 +283,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> vec<3, T, P>::operator++(int) GLM_FUNC_QUALIFIER vec<3, T, P> vec<3, T, P>::operator++(int)
{ {
vec<3, T, P> Result(*this); vec<3, T, P> Result(*this);
@ -291,7 +291,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> vec<3, T, P>::operator--(int) GLM_FUNC_QUALIFIER vec<3, T, P> vec<3, T, P>::operator--(int)
{ {
vec<3, T, P> Result(*this); vec<3, T, P> Result(*this);
@ -301,7 +301,7 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(U scalar)
{ {
@ -311,7 +311,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(vec<1, U, P> const & v)
{ {
@ -321,7 +321,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator%=(vec<3, U, P> const & v)
{ {
@ -331,7 +331,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(U scalar)
{ {
@ -341,7 +341,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(vec<1, U, P> const & v)
{ {
@ -351,7 +351,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator&=(vec<3, U, P> const & v)
{ {
@ -361,7 +361,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(U scalar)
{ {
@ -371,7 +371,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(vec<1, U, P> const & v)
{ {
@ -381,7 +381,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator|=(vec<3, U, P> const & v)
{ {
@ -391,7 +391,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(U scalar)
{ {
@ -401,7 +401,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(vec<1, U, P> const & v)
{ {
@ -411,7 +411,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator^=(vec<3, U, P> const & v)
{ {
@ -421,7 +421,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(U scalar)
{ {
@ -431,7 +431,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(vec<1, U, P> const & v)
{ {
@ -441,7 +441,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator<<=(vec<3, U, P> const & v)
{ {
@ -451,7 +451,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(U scalar)
{ {
@ -461,7 +461,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(vec<1, U, P> const & v)
{ {
@ -471,7 +471,7 @@ namespace glm
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(vec<3, U, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> & vec<3, T, P>::operator>>=(vec<3, U, P> const & v)
{ {
@ -483,13 +483,13 @@ namespace glm
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v)
{ {
return v; return v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -500,7 +500,7 @@ namespace glm
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -509,7 +509,7 @@ namespace glm
v.z + scalar); v.z + scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -518,7 +518,7 @@ namespace glm
v.z + scalar.x); v.z + scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -527,7 +527,7 @@ namespace glm
scalar + v.z); scalar + v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -536,7 +536,7 @@ namespace glm
scalar.x + v.z); scalar.x + v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator+(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -545,7 +545,7 @@ namespace glm
v1.z + v2.z); v1.z + v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -554,7 +554,7 @@ namespace glm
v.z - scalar); v.z - scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -563,7 +563,7 @@ namespace glm
v.z - scalar.x); v.z - scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -572,7 +572,7 @@ namespace glm
scalar - v.z); scalar - v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -581,7 +581,7 @@ namespace glm
scalar.x - v.z); scalar.x - v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator-(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -590,7 +590,7 @@ namespace glm
v1.z - v2.z); v1.z - v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -599,7 +599,7 @@ namespace glm
v.z * scalar); v.z * scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -608,7 +608,7 @@ namespace glm
v.z * scalar.x); v.z * scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -617,7 +617,7 @@ namespace glm
scalar * v.z); scalar * v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -626,7 +626,7 @@ namespace glm
scalar.x * v.z); scalar.x * v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -635,7 +635,7 @@ namespace glm
v1.z * v2.z); v1.z * v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -644,7 +644,7 @@ namespace glm
v.z / scalar); v.z / scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -653,7 +653,7 @@ namespace glm
v.z / scalar.x); v.z / scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator/(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator/(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -662,7 +662,7 @@ namespace glm
scalar / v.z); scalar / v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -671,7 +671,7 @@ namespace glm
scalar.x / v.z); scalar.x / v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator/(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -682,7 +682,7 @@ namespace glm
// -- Binary bit operators -- // -- Binary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -691,7 +691,7 @@ namespace glm
v.z % scalar); v.z % scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -700,7 +700,7 @@ namespace glm
v.z % scalar.x); v.z % scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator%(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator%(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -709,7 +709,7 @@ namespace glm
scalar % v.z); scalar % v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -718,7 +718,7 @@ namespace glm
scalar.x % v.z); scalar.x % v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator%(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -727,7 +727,7 @@ namespace glm
v1.z % v2.z); v1.z % v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -736,7 +736,7 @@ namespace glm
v.z & scalar); v.z & scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -745,7 +745,7 @@ namespace glm
v.z & scalar.x); v.z & scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator&(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator&(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -754,7 +754,7 @@ namespace glm
scalar & v.z); scalar & v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -763,7 +763,7 @@ namespace glm
scalar.x & v.z); scalar.x & v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator&(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -772,7 +772,7 @@ namespace glm
v1.z & v2.z); v1.z & v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -781,7 +781,7 @@ namespace glm
v.z | scalar); v.z | scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -790,7 +790,7 @@ namespace glm
v.z | scalar.x); v.z | scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator|(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator|(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -799,7 +799,7 @@ namespace glm
scalar | v.z); scalar | v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -808,7 +808,7 @@ namespace glm
scalar.x | v.z); scalar.x | v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator|(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -817,7 +817,7 @@ namespace glm
v1.z | v2.z); v1.z | v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -826,7 +826,7 @@ namespace glm
v.z ^ scalar); v.z ^ scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -835,7 +835,7 @@ namespace glm
v.z ^ scalar.x); v.z ^ scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator^(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator^(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -844,7 +844,7 @@ namespace glm
scalar ^ v.z); scalar ^ v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -853,7 +853,7 @@ namespace glm
scalar.x ^ v.z); scalar.x ^ v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator^(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -862,7 +862,7 @@ namespace glm
v1.z ^ v2.z); v1.z ^ v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -871,7 +871,7 @@ namespace glm
v.z << scalar); v.z << scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -880,7 +880,7 @@ namespace glm
v.z << scalar.x); v.z << scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -889,7 +889,7 @@ namespace glm
scalar << v.z); scalar << v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -898,7 +898,7 @@ namespace glm
scalar.x << v.z); scalar.x << v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator<<(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -907,7 +907,7 @@ namespace glm
v1.z << v2.z); v1.z << v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v, T scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -916,7 +916,7 @@ namespace glm
v.z >> scalar); v.z >> scalar);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -925,7 +925,7 @@ namespace glm
v.z >> scalar.x); v.z >> scalar.x);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(T scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(T scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -934,7 +934,7 @@ namespace glm
scalar >> v.z); scalar >> v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<1, T, P> const & scalar, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<1, T, P> const & scalar, vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -943,7 +943,7 @@ namespace glm
scalar.x >> v.z); scalar.x >> v.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER vec<3, T, P> operator>>(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -952,7 +952,7 @@ namespace glm
v1.z >> v2.z); v1.z >> v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator~(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator~(vec<3, T, P> const & v)
{ {
return vec<3, T, P>( return vec<3, T, P>(
@ -963,7 +963,7 @@ namespace glm
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator==(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return return
@ -972,19 +972,19 @@ namespace glm
detail::compute_equal<T>::call(v1.z, v2.z); detail::compute_equal<T>::call(v1.z, v2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(vec<3, T, P> const & v1, vec<3, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator!=(vec<3, T, P> const & v1, vec<3, T, P> const & v2)
{ {
return !(v1 == v2); return !(v1 == v2);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<3, bool, P> operator&&(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<3, bool, P> operator&&(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2)
{ {
return vec<3, bool, P>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z); return vec<3, bool, P>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<3, bool, P> operator||(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<3, bool, P> operator||(vec<3, bool, P> const & v1, vec<3, bool, P> const & v2)
{ {
return vec<3, bool, P>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z); return vec<3, bool, P>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z);

View File

@ -15,7 +15,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
struct vec<4, T, P> struct vec<4, T, P>
{ {
// -- Implementation detail -- // -- Implementation detail --
@ -91,7 +91,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec() GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, P> const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, P> const& v) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD vec(vec<4, T, Q> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
@ -110,41 +110,41 @@ namespace glm
// -- Conversion vector constructors -- // -- Conversion vector constructors --
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, B _z, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, B _z, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, Q> const& _yz, C _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<2, B, Q> const& _yz, C _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, B _y, vec<2, C, Q> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, B _y, vec<2, C, Q> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, Q> const& _xyz, B _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, Q> const& _xyz, B _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<3, B, Q> const& _yzw); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(A _x, vec<3, B, Q> const& _yzw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR GLM_EXPLICIT vec(vec<4, U, Q> const& v);
// -- Swizzle constructors -- // -- Swizzle constructors --
@ -272,179 +272,179 @@ namespace glm
// -- Unary operators -- // -- Unary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator+(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(vec<1, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator+(vec<1, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator-(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(vec<1, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator-(vec<1, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator*(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(vec<1, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator*(vec<1, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<1, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<1, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator/(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator/(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator/(vec<1, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator/(vec<1, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator%(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator%(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator%(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator%(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator&(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator&(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator&(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator&(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator&(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator|(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator|(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator|(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator|(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator^(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator^(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator^(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator^(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator<<(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator<<(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator<<(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator<<(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v, T scalar); GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v, T scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v, vec<1, T, P> const & scalar); GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v, vec<1, T, P> const & scalar);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator>>(T scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator>>(T scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator>>(vec<1, T, P> const & scalar, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator>>(vec<1, T, P> const & scalar, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator~(vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator~(vec<4, T, P> const & v);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL bool operator==(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(vec<4, T, P> const & v1, vec<4, T, P> const & v2); GLM_FUNC_DECL bool operator!=(vec<4, T, P> const & v1, vec<4, T, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<4, bool, P> operator&&(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2); GLM_FUNC_DECL vec<4, bool, P> operator&&(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2);
template<precision P> template<qualifier P>
GLM_FUNC_DECL vec<4, bool, P> operator||(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2); GLM_FUNC_DECL vec<4, bool, P> operator||(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2);
}//namespace glm }//namespace glm

View File

@ -34,7 +34,7 @@ namespace detail
enum test {value = ~0}; enum test {value = ~0};
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_vec4_add struct compute_vec4_add
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -43,7 +43,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_vec4_sub struct compute_vec4_sub
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -52,7 +52,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_vec4_mul struct compute_vec4_mul
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -61,7 +61,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_vec4_div struct compute_vec4_div
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -70,7 +70,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_vec4_mod struct compute_vec4_mod
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -79,7 +79,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_and struct compute_vec4_and
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -88,7 +88,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_or struct compute_vec4_or
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -97,7 +97,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_xor struct compute_vec4_xor
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -106,7 +106,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_shift_left struct compute_vec4_shift_left
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -115,7 +115,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_shift_right struct compute_vec4_shift_right
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & a, vec<4, T, P> const & b)
@ -124,7 +124,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_equal struct compute_vec4_equal
{ {
GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
@ -137,7 +137,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_nequal struct compute_vec4_nequal
{ {
GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
@ -146,7 +146,7 @@ namespace detail
} }
}; };
template<typename T, precision P, int IsInt, std::size_t Size, bool Aligned> template<typename T, qualifier P, int IsInt, std::size_t Size, bool Aligned>
struct compute_vec4_bitwise_not struct compute_vec4_bitwise_not
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const & v)
@ -159,39 +159,39 @@ namespace detail
// -- Implicit basic constructors -- // -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec()
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(vec<4, T, P> const & v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(vec<4, T, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(vec<4, T, Q> const & v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar) : x(scalar), y(scalar), z(scalar), w(scalar)
{} {}
template <typename T, precision P> template <typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T _x, T _y, T _z, T _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(T _x, T _y, T _z, T _w)
: x(_x), y(_y), z(_z), w(_w) : x(_x), y(_y), z(_z), w(_w)
{} {}
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(X _x, Y _y, Z _z, W _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD vec<4, T, P>::vec(X _x, Y _y, Z _z, W _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
@ -200,7 +200,7 @@ namespace detail
, w(static_cast<T>(_w)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename X, typename Y, typename Z, typename W> template<typename X, typename Y, typename Z, typename W>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z, vec<1, W, P> const& _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, X, P> const& _x, vec<1, Y, P> const& _y, vec<1, Z, P> const& _z, vec<1, W, P> const& _w)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
@ -211,8 +211,8 @@ namespace detail
// -- Conversion vector constructors -- // -- Conversion vector constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, B _z, C _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, B _z, C _w)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
@ -220,8 +220,8 @@ namespace detail
, w(static_cast<T>(_w)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<1, B, Q> const& _z, vec<1, C, Q> const& _w)
: x(static_cast<T>(_xy.x)) : x(static_cast<T>(_xy.x))
, y(static_cast<T>(_xy.y)) , y(static_cast<T>(_xy.y))
@ -229,8 +229,8 @@ namespace detail
, w(static_cast<T>(_w.x)) , w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, vec<2, B, Q> const& _yz, C _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, vec<2, B, Q> const& _yz, C _w)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
@ -238,8 +238,8 @@ namespace detail
, w(static_cast<T>(_w)) , w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<2, B, Q> const& _yz, vec<1, C, Q> const& _w)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_yz.x)) , y(static_cast<T>(_yz.x))
@ -247,8 +247,8 @@ namespace detail
, w(static_cast<T>(_w.x)) , w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, B _y, vec<2, C, Q> const& _zw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, B _y, vec<2, C, Q> const& _zw)
: x(static_cast<T>(_x)) : x(static_cast<T>(_x))
, y(static_cast<T>(_y)) , y(static_cast<T>(_y))
@ -256,8 +256,8 @@ namespace detail
, w(static_cast<T>(_zw.y)) , w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, typename C, precision Q> template<typename A, typename B, typename C, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<1, B, Q> const& _y, vec<2, C, Q> const& _zw)
: x(static_cast<T>(_x.x)) : x(static_cast<T>(_x.x))
, y(static_cast<T>(_y.x)) , y(static_cast<T>(_y.x))
@ -265,8 +265,8 @@ namespace detail
, w(static_cast<T>(_zw.y)) , w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, B _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, B _w) :
x(static_cast<T>(_xyz.x)), x(static_cast<T>(_xyz.x)),
y(static_cast<T>(_xyz.y)), y(static_cast<T>(_xyz.y)),
@ -274,8 +274,8 @@ namespace detail
w(static_cast<T>(_w)) w(static_cast<T>(_w))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<3, A, Q> const& _xyz, vec<1, B, Q> const& _w) :
x(static_cast<T>(_xyz.x)), x(static_cast<T>(_xyz.x)),
y(static_cast<T>(_xyz.y)), y(static_cast<T>(_xyz.y)),
@ -283,8 +283,8 @@ namespace detail
w(static_cast<T>(_w.x)) w(static_cast<T>(_w.x))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, vec<3, B, Q> const& _yzw) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(A _x, vec<3, B, Q> const& _yzw) :
x(static_cast<T>(_x)), x(static_cast<T>(_x)),
y(static_cast<T>(_yzw.x)), y(static_cast<T>(_yzw.x)),
@ -292,8 +292,8 @@ namespace detail
w(static_cast<T>(_yzw.z)) w(static_cast<T>(_yzw.z))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<1, A, Q> const& _x, vec<3, B, Q> const& _yzw) :
x(static_cast<T>(_x.x)), x(static_cast<T>(_x.x)),
y(static_cast<T>(_yzw.x)), y(static_cast<T>(_yzw.x)),
@ -301,8 +301,8 @@ namespace detail
w(static_cast<T>(_yzw.z)) w(static_cast<T>(_yzw.z))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename A, typename B, precision Q> template<typename A, typename B, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<2, A, Q> const& _xy, vec<2, B, Q> const& _zw) :
x(static_cast<T>(_xy.x)), x(static_cast<T>(_xy.x)),
y(static_cast<T>(_xy.y)), y(static_cast<T>(_xy.y)),
@ -310,8 +310,8 @@ namespace detail
w(static_cast<T>(_zw.y)) w(static_cast<T>(_zw.y))
{} {}
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<4, U, Q> const& v) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR vec<4, T, P>::vec(vec<4, U, Q> const& v) :
x(static_cast<T>(v.x)), x(static_cast<T>(v.x)),
y(static_cast<T>(v.y)), y(static_cast<T>(v.y)),
@ -321,14 +321,14 @@ namespace detail
// -- Component accesses -- // -- Component accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i) GLM_FUNC_QUALIFIER T& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i)
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
return (&x)[i]; return (&x)[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i) const GLM_FUNC_QUALIFIER T const& vec<4, T, P>::operator[](typename vec<4, T, P>::length_type i) const
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
@ -338,7 +338,7 @@ namespace detail
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P>& vec<4, T, P>::operator=(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P>& vec<4, T, P>::operator=(vec<4, T, P> const & v)
{ {
this->x = v.x; this->x = v.x;
@ -349,7 +349,7 @@ namespace detail
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P>& vec<4, T, P>::operator=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P>& vec<4, T, P>::operator=(vec<4, U, P> const & v)
{ {
@ -360,84 +360,84 @@ namespace detail
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(U scalar)
{ {
return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x))); return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator+=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(U scalar)
{ {
return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x))); return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator-=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(U scalar)
{ {
return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x))); return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator*=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(U scalar)
{ {
return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x))); return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v.x)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator/=(vec<4, U, P> const & v)
{ {
@ -446,7 +446,7 @@ namespace detail
// -- Increment and decrement operators -- // -- Increment and decrement operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator++() GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator++()
{ {
++this->x; ++this->x;
@ -456,7 +456,7 @@ namespace detail
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator--() GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator--()
{ {
--this->x; --this->x;
@ -466,7 +466,7 @@ namespace detail
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> vec<4, T, P>::operator++(int) GLM_FUNC_QUALIFIER vec<4, T, P> vec<4, T, P>::operator++(int)
{ {
vec<4, T, P> Result(*this); vec<4, T, P> Result(*this);
@ -474,7 +474,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> vec<4, T, P>::operator--(int) GLM_FUNC_QUALIFIER vec<4, T, P> vec<4, T, P>::operator--(int)
{ {
vec<4, T, P> Result(*this); vec<4, T, P> Result(*this);
@ -484,126 +484,126 @@ namespace detail
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(U scalar)
{ {
return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(vec<1, U, P> const& v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(vec<1, U, P> const& v)
{ {
return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(vec<4, U, P> const& v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator%=(vec<4, U, P> const& v)
{ {
return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(U scalar)
{ {
return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator&=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(U scalar)
{ {
return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator|=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(U scalar)
{ {
return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator^=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(U scalar)
{ {
return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator<<=(vec<4, U, P> const & v)
{ {
return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(U scalar) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(U scalar)
{ {
return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar))); return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(scalar)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(vec<1, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(vec<1, U, P> const & v)
{ {
return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v))); return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, vec<4, T, P>(v)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(vec<4, U, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> & vec<4, T, P>::operator>>=(vec<4, U, P> const & v)
{ {
@ -612,13 +612,13 @@ namespace detail
// -- Unary constant operators -- // -- Unary constant operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v)
{ {
return v; return v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v)
{ {
return vec<4, T, P>(0) -= v; return vec<4, T, P>(0) -= v;
@ -626,121 +626,121 @@ namespace detail
// -- Binary arithmetic operators -- // -- Binary arithmetic operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) += scalar; return vec<4, T, P>(v) += scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) += v2; return vec<4, T, P>(v1) += v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(v) += scalar; return vec<4, T, P>(v) += scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v2) += v1; return vec<4, T, P>(v2) += v1;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator+(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) += v2; return vec<4, T, P>(v1) += v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) -= scalar; return vec<4, T, P>(v) -= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) -= v2; return vec<4, T, P>(v1) -= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) -= v; return vec<4, T, P>(scalar) -= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) -= v2; return vec<4, T, P>(v1.x) -= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator-(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) -= v2; return vec<4, T, P>(v1) -= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) *= scalar; return vec<4, T, P>(v) *= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) *= v2; return vec<4, T, P>(v1) *= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(v) *= scalar; return vec<4, T, P>(v) *= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v2) *= v1; return vec<4, T, P>(v2) *= v1;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) *= v2; return vec<4, T, P>(v1) *= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) /= scalar; return vec<4, T, P>(v) /= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) /= v2; return vec<4, T, P>(v1) /= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator/(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator/(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) /= v; return vec<4, T, P>(scalar) /= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) /= v2; return vec<4, T, P>(v1.x) /= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator/(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) /= v2; return vec<4, T, P>(v1) /= v2;
@ -748,187 +748,187 @@ namespace detail
// -- Binary bit operators -- // -- Binary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) %= scalar; return vec<4, T, P>(v) %= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) %= v2.x; return vec<4, T, P>(v1) %= v2.x;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator%(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator%(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) %= v; return vec<4, T, P>(scalar) %= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<1, T, P> const & scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<1, T, P> const & scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar.x) %= v; return vec<4, T, P>(scalar.x) %= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator%(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) %= v2; return vec<4, T, P>(v1) %= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) &= scalar; return vec<4, T, P>(v) &= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v, vec<1, T, P> const & scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v, vec<1, T, P> const & scalar)
{ {
return vec<4, T, P>(v) &= scalar; return vec<4, T, P>(v) &= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator&(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator&(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) &= v; return vec<4, T, P>(scalar) &= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) &= v2; return vec<4, T, P>(v1.x) &= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator&(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) &= v2; return vec<4, T, P>(v1) &= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) |= scalar; return vec<4, T, P>(v) |= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) |= v2.x; return vec<4, T, P>(v1) |= v2.x;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator|(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator|(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) |= v; return vec<4, T, P>(scalar) |= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) |= v2; return vec<4, T, P>(v1.x) |= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator|(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) |= v2; return vec<4, T, P>(v1) |= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) ^= scalar; return vec<4, T, P>(v) ^= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) ^= v2.x; return vec<4, T, P>(v1) ^= v2.x;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator^(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator^(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) ^= v; return vec<4, T, P>(scalar) ^= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) ^= v2; return vec<4, T, P>(v1.x) ^= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator^(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) ^= v2; return vec<4, T, P>(v1) ^= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) <<= scalar; return vec<4, T, P>(v) <<= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) <<= v2.x; return vec<4, T, P>(v1) <<= v2.x;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) <<= v; return vec<4, T, P>(scalar) <<= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) <<= v2; return vec<4, T, P>(v1.x) <<= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator<<(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) <<= v2; return vec<4, T, P>(v1) <<= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v, T scalar) GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v, T scalar)
{ {
return vec<4, T, P>(v) >>= scalar; return vec<4, T, P>(v) >>= scalar;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<1, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<1, T, P> const & v2)
{ {
return vec<4, T, P>(v1) >>= v2.x; return vec<4, T, P>(v1) >>= v2.x;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(T scalar, vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(T scalar, vec<4, T, P> const & v)
{ {
return vec<4, T, P>(scalar) >>= v; return vec<4, T, P>(scalar) >>= v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<1, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<1, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1.x) >>= v2; return vec<4, T, P>(v1.x) >>= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER vec<4, T, P> operator>>(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return vec<4, T, P>(v1) >>= v2; return vec<4, T, P>(v1) >>= v2;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator~(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER vec<4, T, P> operator~(vec<4, T, P> const & v)
{ {
return detail::compute_vec4_bitwise_not<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v); return detail::compute_vec4_bitwise_not<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v);
@ -936,25 +936,25 @@ namespace detail
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator==(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return detail::compute_vec4_equal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2); return detail::compute_vec4_equal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(vec<4, T, P> const & v1, vec<4, T, P> const & v2) GLM_FUNC_QUALIFIER bool operator!=(vec<4, T, P> const & v1, vec<4, T, P> const & v2)
{ {
return detail::compute_vec4_nequal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2); return detail::compute_vec4_nequal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> operator&&(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<4, bool, P> operator&&(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2)
{ {
return vec<4, bool, P>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z, v1.w && v2.w); return vec<4, bool, P>(v1.x && v2.x, v1.y && v2.y, v1.z && v2.z, v1.w && v2.w);
} }
template<precision P> template<qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> operator||(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2) GLM_FUNC_QUALIFIER vec<4, bool, P> operator||(vec<4, bool, P> const & v1, vec<4, bool, P> const & v2)
{ {
return vec<4, bool, P>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z, v1.w || v2.w); return vec<4, bool, P>(v1.x || v2.x, v1.y || v2.y, v1.z || v2.z, v1.w || v2.w);

View File

@ -7,7 +7,7 @@ namespace glm{
namespace detail namespace detail
{ {
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
template<precision P, int E0, int E1, int E2, int E3> template<qualifier P, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4> struct _swizzle_base1<4, float, P, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, float, P> operator ()() const GLM_FUNC_QUALIFIER vec<4, float, P> operator ()() const
@ -24,7 +24,7 @@ namespace detail
} }
}; };
template<precision P, int E0, int E1, int E2, int E3> template<qualifier P, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4> struct _swizzle_base1<4, int32, P, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, int32, P> operator ()() const GLM_FUNC_QUALIFIER vec<4, int32, P> operator ()() const
@ -37,7 +37,7 @@ namespace detail
} }
}; };
template<precision P, int E0, int E1, int E2, int E3> template<qualifier P, int E0, int E1, int E2, int E3>
struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4> struct _swizzle_base1<4, uint32, P, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4>
{ {
GLM_FUNC_QUALIFIER vec<4, uint32, P> operator ()() const GLM_FUNC_QUALIFIER vec<4, uint32, P> operator ()() const
@ -51,7 +51,7 @@ namespace detail
}; };
# endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
template<precision P> template<qualifier P>
struct compute_vec4_add<float, P, true> struct compute_vec4_add<float, P, true>
{ {
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
@ -63,7 +63,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_vec4_add<double, P, true> struct compute_vec4_add<double, P, true>
{ {
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
@ -75,7 +75,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_vec4_sub<float, P, true> struct compute_vec4_sub<float, P, true>
{ {
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
@ -87,7 +87,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_vec4_sub<double, P, true> struct compute_vec4_sub<double, P, true>
{ {
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
@ -99,7 +99,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_vec4_mul<float, P, true> struct compute_vec4_mul<float, P, true>
{ {
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
@ -111,7 +111,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_vec4_mul<double, P, true> struct compute_vec4_mul<double, P, true>
{ {
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
@ -123,7 +123,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_vec4_div<float, P, true> struct compute_vec4_div<float, P, true>
{ {
static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b) static vec<4, float, P> call(vec<4, float, P> const & a, vec<4, float, P> const & b)
@ -135,7 +135,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_vec4_div<double, P, true> struct compute_vec4_div<double, P, true>
{ {
static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b) static vec<4, double, P> call(vec<4, double, P> const & a, vec<4, double, P> const & b)
@ -158,7 +158,7 @@ namespace detail
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_and<T, P, true, 32, true> struct compute_vec4_and<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -170,7 +170,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_and<T, P, true, 64, true> struct compute_vec4_and<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -182,7 +182,7 @@ namespace detail
}; };
# endif # endif
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_or<T, P, true, 32, true> struct compute_vec4_or<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -194,7 +194,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_or<T, P, true, 64, true> struct compute_vec4_or<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -206,7 +206,7 @@ namespace detail
}; };
# endif # endif
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_xor<T, P, true, 32, true> struct compute_vec4_xor<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -218,7 +218,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_xor<T, P, true, 64, true> struct compute_vec4_xor<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -230,7 +230,7 @@ namespace detail
}; };
# endif # endif
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_shift_left<T, P, true, 32, true> struct compute_vec4_shift_left<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -242,7 +242,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_shift_left<T, P, true, 64, true> struct compute_vec4_shift_left<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -254,7 +254,7 @@ namespace detail
}; };
# endif # endif
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_shift_right<T, P, true, 32, true> struct compute_vec4_shift_right<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -266,7 +266,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_shift_right<T, P, true, 64, true> struct compute_vec4_shift_right<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b) static vec<4, T, P> call(vec<4, T, P> const& a, vec<4, T, P> const& b)
@ -278,7 +278,7 @@ namespace detail
}; };
# endif # endif
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_bitwise_not<T, P, true, 32, true> struct compute_vec4_bitwise_not<T, P, true, 32, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const & v) static vec<4, T, P> call(vec<4, T, P> const & v)
@ -290,7 +290,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template<typename T, precision P> template<typename T, qualifier P>
struct compute_vec4_bitwise_not<T, P, true, 64, true> struct compute_vec4_bitwise_not<T, P, true, 64, true>
{ {
static vec<4, T, P> call(vec<4, T, P> const & v) static vec<4, T, P> call(vec<4, T, P> const & v)
@ -302,7 +302,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_vec4_equal<float, P, false, 32, true> struct compute_vec4_equal<float, P, false, 32, true>
{ {
static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
@ -311,7 +311,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_vec4_equal<int32, P, true, 32, true> struct compute_vec4_equal<int32, P, true, 32, true>
{ {
static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)
@ -320,7 +320,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_vec4_nequal<float, P, false, 32, true> struct compute_vec4_nequal<float, P, false, 32, true>
{ {
static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2) static bool call(vec<4, float, P> const & v1, vec<4, float, P> const & v2)
@ -329,7 +329,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_vec4_nequal<int32, P, true, 32, true> struct compute_vec4_nequal<int32, P, true, 32, true>
{ {
static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2) static bool call(vec<4, int32, P> const & v1, vec<4, int32, P> const & v2)

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,7 @@
/// ///
/// 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 precision-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".
/// ///
/// The best documentation for GLM Core is the current GLSL specification, /// The best documentation for GLM Core is the current GLSL specification,
@ -27,16 +27,16 @@
/// ///
/// @defgroup core_precision Precision types /// @defgroup core_precision Precision types
/// ///
/// @brief Non-GLSL types that are used to define precision-based types. /// @brief Non-GLSL types that are used to define qualifier-based types.
/// ///
/// The GLSL language allows the user to define the precision of a particular variable. /// The GLSL language allows the user to define the qualifier of a particular variable.
/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility /// In OpenGL's GLSL, these qualifier qualifiers have no effect; they are there for compatibility
/// with OpenGL ES's precision qualifiers, where they @em do have an effect. /// with OpenGL ES's qualifier qualifiers, where they @em do have an effect.
/// ///
/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: /// C++ has no language equivalent to qualifier qualifiers. So GLM provides the next-best thing:
/// a number of typedefs of the @ref core_template that use a particular precision. /// a number of typedefs of the @ref core_template that use a particular qualifier.
/// ///
/// None of these types make any guarantees about the actual precision used. /// None of these types make any guarantees about the actual qualifier used.
/// ///
/// @ingroup core /// @ingroup core
/// ///

View File

@ -16,7 +16,7 @@
#pragma once #pragma once
// Dependencies // Dependencies
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/type_int.hpp" #include "../detail/type_int.hpp"
#include "../detail/_vectorize.hpp" #include "../detail/_vectorize.hpp"
#include <limits> #include <limits>
@ -39,7 +39,7 @@ namespace glm
/// Build a mask of 'count' bits /// Build a mask of 'count' bits
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
template<typename T, precision P, template<typename, precision> class vecIUType> template<typename T, qualifier P, template<typename, qualifier> class vecIUType>
GLM_FUNC_DECL vecIUType<T, P> mask(vecIUType<T, P> const & v); GLM_FUNC_DECL vecIUType<T, P> mask(vecIUType<T, P> const & v);
/// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side. /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side.
@ -51,8 +51,8 @@ namespace glm
/// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side. /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> bitfieldRotateRight(vecType<L, T, P> const & In, int Shift); GLM_FUNC_DECL vec<L, T, P> bitfieldRotateRight(vec<L, T, P> const & In, int Shift);
/// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side. /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side.
/// ///
@ -63,8 +63,8 @@ namespace glm
/// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side. /// Rotate all bits to the left. All the bits dropped in the left side are inserted back on the right side.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> bitfieldRotateLeft(vecType<L, T, P> const & In, int Shift); GLM_FUNC_DECL vec<L, T, P> bitfieldRotateLeft(vec<L, T, P> const & In, int Shift);
/// Set to 1 a range of bits. /// Set to 1 a range of bits.
/// ///
@ -75,8 +75,8 @@ namespace glm
/// Set to 1 a range of bits. /// Set to 1 a range of bits.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> bitfieldFillOne(vecType<L, T, P> const & Value, int FirstBit, int BitCount); GLM_FUNC_DECL vec<L, T, P> bitfieldFillOne(vec<L, T, P> const & Value, int FirstBit, int BitCount);
/// Set to 0 a range of bits. /// Set to 0 a range of bits.
/// ///
@ -87,8 +87,8 @@ namespace glm
/// Set to 0 a range of bits. /// Set to 0 a range of bits.
/// ///
/// @see gtc_bitfield /// @see gtc_bitfield
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> bitfieldFillZero(vecType<L, T, P> const & Value, int FirstBit, int BitCount); GLM_FUNC_DECL vec<L, T, P> bitfieldFillZero(vec<L, T, P> const & Value, int FirstBit, int BitCount);
/// 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.

View File

@ -230,7 +230,7 @@ namespace detail
return Bits >= sizeof(genIUType) * 8 ? ~static_cast<genIUType>(0) : (static_cast<genIUType>(1) << Bits) - static_cast<genIUType>(1); return Bits >= sizeof(genIUType) * 8 ? ~static_cast<genIUType>(0) : (static_cast<genIUType>(1) << Bits) - static_cast<genIUType>(1);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecIUType> template<length_t L, typename T, qualifier P, template<length_t, typename, qualifier> class vecIUType>
GLM_FUNC_QUALIFIER vecIUType<L, T, P> mask(vecIUType<L, T, P> const& v) GLM_FUNC_QUALIFIER vecIUType<L, T, P> mask(vecIUType<L, T, P> const& v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'mask' accepts only integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'mask' accepts only integer values");
@ -247,8 +247,8 @@ namespace detail
return (In << static_cast<genIType>(Shift)) | (In >> static_cast<genIType>(BitSize - Shift)); return (In << static_cast<genIType>(Shift)) | (In >> static_cast<genIType>(BitSize - Shift));
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> bitfieldRotateRight(vecType<L, T, P> const & In, int Shift) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldRotateRight(vec<L, T, P> const & In, int Shift)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateRight' accepts only integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateRight' accepts only integer values");
@ -265,8 +265,8 @@ namespace detail
return (In >> static_cast<genIType>(Shift)) | (In << static_cast<genIType>(BitSize - Shift)); return (In >> static_cast<genIType>(Shift)) | (In << static_cast<genIType>(BitSize - Shift));
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> bitfieldRotateLeft(vecType<L, T, P> const& In, int Shift) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldRotateLeft(vec<L, T, P> const& In, int Shift)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateLeft' accepts only integer values"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateLeft' accepts only integer values");
@ -280,8 +280,8 @@ namespace detail
return Value | static_cast<genIUType>(mask(BitCount) << FirstBit); return Value | static_cast<genIUType>(mask(BitCount) << FirstBit);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> bitfieldFillOne(vecType<L, T, P> const& Value, int FirstBit, int BitCount) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldFillOne(vec<L, T, P> const& Value, int FirstBit, int BitCount)
{ {
return Value | static_cast<T>(mask(BitCount) << FirstBit); return Value | static_cast<T>(mask(BitCount) << FirstBit);
} }
@ -292,8 +292,8 @@ namespace detail
return Value & static_cast<genIUType>(~(mask(BitCount) << FirstBit)); return Value & static_cast<genIUType>(~(mask(BitCount) << FirstBit));
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> bitfieldFillZero(vecType<L, T, P> const& Value, int FirstBit, int BitCount) GLM_FUNC_QUALIFIER vec<L, T, P> bitfieldFillZero(vec<L, T, P> const& Value, int FirstBit, int BitCount)
{ {
return Value & static_cast<T>(~(mask(BitCount) << FirstBit)); return Value & static_cast<T>(~(mask(BitCount) << FirstBit));
} }

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../exponential.hpp" #include "../exponential.hpp"
#include "../vec3.hpp" #include "../vec3.hpp"
#include "../vec4.hpp" #include "../vec4.hpp"
@ -32,23 +32,23 @@ namespace glm
/// Convert a linear color to sRGB color using a standard gamma correction. /// Convert a linear color to sRGB color using a standard gamma correction.
/// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> convertLinearToSRGB(vecType<L, T, P> const & ColorLinear); GLM_FUNC_DECL vec<L, T, P> convertLinearToSRGB(vec<L, T, P> const & ColorLinear);
/// Convert a linear color to sRGB color using a custom gamma correction. /// Convert a linear color to sRGB color using a custom gamma correction.
/// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> convertLinearToSRGB(vecType<L, T, P> const & ColorLinear, T Gamma); GLM_FUNC_DECL vec<L, T, P> convertLinearToSRGB(vec<L, T, P> const & ColorLinear, T Gamma);
/// Convert a sRGB color to linear color using a standard gamma correction. /// Convert a sRGB color to linear color using a standard gamma correction.
/// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb /// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> convertSRGBToLinear(vecType<L, T, P> const & ColorSRGB); GLM_FUNC_DECL vec<L, T, P> convertSRGBToLinear(vec<L, T, P> const & ColorSRGB);
/// Convert a sRGB color to linear color using a custom gamma correction. /// Convert a sRGB color to linear color using a custom gamma correction.
// IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb // IEC 61966-2-1:1999 / Rec. 709 specification https://www.w3.org/Graphics/Color/srgb
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> convertSRGBToLinear(vecType<L, T, P> const & ColorSRGB, T Gamma); GLM_FUNC_DECL vec<L, T, P> convertSRGBToLinear(vec<L, T, P> const & ColorSRGB, T Gamma);
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -4,55 +4,55 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
struct compute_rgbToSrgb struct compute_rgbToSrgb
{ {
GLM_FUNC_QUALIFIER static vecType<L, T, P> call(vecType<L, T, P> const& ColorRGB, T GammaCorrection) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& ColorRGB, T GammaCorrection)
{ {
vecType<L, T, P> const ClampedColor(clamp(ColorRGB, static_cast<T>(0), static_cast<T>(1))); vec<L, T, P> const ClampedColor(clamp(ColorRGB, static_cast<T>(0), static_cast<T>(1)));
return mix( return mix(
pow(ClampedColor, vecType<L, T, P>(GammaCorrection)) * static_cast<T>(1.055) - static_cast<T>(0.055), pow(ClampedColor, vec<L, T, P>(GammaCorrection)) * static_cast<T>(1.055) - static_cast<T>(0.055),
ClampedColor * static_cast<T>(12.92), ClampedColor * static_cast<T>(12.92),
lessThan(ClampedColor, vecType<L, T, P>(static_cast<T>(0.0031308)))); lessThan(ClampedColor, vec<L, T, P>(static_cast<T>(0.0031308))));
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct compute_rgbToSrgb<4, T, P, vec> struct compute_rgbToSrgb<4, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorRGB, T GammaCorrection) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorRGB, T GammaCorrection)
{ {
return vec<4, T, P>(compute_rgbToSrgb<3, T, P, vec>::call(vec<3, T, P>(ColorRGB), GammaCorrection), ColorRGB.w); return vec<4, T, P>(compute_rgbToSrgb<3, T, P>::call(vec<3, T, P>(ColorRGB), GammaCorrection), ColorRGB.w);
} }
}; };
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
struct compute_srgbToRgb struct compute_srgbToRgb
{ {
GLM_FUNC_QUALIFIER static vecType<L, T, P> call(vecType<L, T, P> const& ColorSRGB, T Gamma) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& ColorSRGB, T Gamma)
{ {
return mix( return mix(
pow((ColorSRGB + static_cast<T>(0.055)) * static_cast<T>(0.94786729857819905213270142180095), vecType<L, T, P>(Gamma)), pow((ColorSRGB + static_cast<T>(0.055)) * static_cast<T>(0.94786729857819905213270142180095), vec<L, T, P>(Gamma)),
ColorSRGB * static_cast<T>(0.07739938080495356037151702786378), ColorSRGB * static_cast<T>(0.07739938080495356037151702786378),
lessThanEqual(ColorSRGB, vecType<L, T, P>(static_cast<T>(0.04045)))); lessThanEqual(ColorSRGB, vec<L, T, P>(static_cast<T>(0.04045))));
} }
}; };
template<typename T, precision P> template<typename T, qualifier P>
struct compute_srgbToRgb<4, T, P, vec> struct compute_srgbToRgb<4, T, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorSRGB, T Gamma) GLM_FUNC_QUALIFIER static vec<4, T, P> call(vec<4, T, P> const& ColorSRGB, T Gamma)
{ {
return vec<4, T, P>(compute_srgbToRgb<3, T, P, vec>::call(vec<3, T, P>(ColorSRGB), Gamma), ColorSRGB.w); return vec<4, T, P>(compute_srgbToRgb<3, T, P>::call(vec<3, T, P>(ColorSRGB), Gamma), ColorSRGB.w);
} }
}; };
}//namespace detail }//namespace detail
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> convertLinearToSRGB(vecType<L, T, P> const& ColorLinear) GLM_FUNC_QUALIFIER vec<L, T, P> convertLinearToSRGB(vec<L, T, P> const& ColorLinear)
{ {
return detail::compute_rgbToSrgb<L, T, P, vecType>::call(ColorLinear, static_cast<T>(0.41666)); return detail::compute_rgbToSrgb<L, T, P>::call(ColorLinear, static_cast<T>(0.41666));
} }
// Based on Ian Taylor http://chilliant.blogspot.fr/2012/08/srgb-approximations-for-hlsl.html // Based on Ian Taylor http://chilliant.blogspot.fr/2012/08/srgb-approximations-for-hlsl.html
@ -65,21 +65,21 @@ namespace detail
return 0.662002687f * S1 + 0.684122060f * S2 - 0.323583601f * S3 - 0.0225411470f * ColorLinear; return 0.662002687f * S1 + 0.684122060f * S2 - 0.323583601f * S3 - 0.0225411470f * ColorLinear;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> convertLinearToSRGB(vecType<L, T, P> const& ColorLinear, T Gamma) GLM_FUNC_QUALIFIER vec<L, T, P> convertLinearToSRGB(vec<L, T, P> const& ColorLinear, T Gamma)
{ {
return detail::compute_rgbToSrgb<L, T, P, vecType>::call(ColorLinear, static_cast<T>(1) / Gamma); return detail::compute_rgbToSrgb<L, T, P>::call(ColorLinear, static_cast<T>(1) / Gamma);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> convertSRGBToLinear(vecType<L, T, P> const& ColorSRGB) GLM_FUNC_QUALIFIER vec<L, T, P> convertSRGBToLinear(vec<L, T, P> const& ColorSRGB)
{ {
return detail::compute_srgbToRgb<L, T, P, vecType>::call(ColorSRGB, static_cast<T>(2.4)); return detail::compute_srgbToRgb<L, T, P>::call(ColorSRGB, static_cast<T>(2.4));
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> convertSRGBToLinear(vecType<L, T, P> const& ColorSRGB, T Gamma) GLM_FUNC_QUALIFIER vec<L, T, P> convertSRGBToLinear(vec<L, T, P> const& ColorSRGB, T Gamma)
{ {
return detail::compute_srgbToRgb<L, T, P, vecType>::call(ColorSRGB, Gamma); return detail::compute_srgbToRgb<L, T, P>::call(ColorSRGB, Gamma);
} }
}//namespace glm }//namespace glm

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTC_epsilon extension included") # pragma message("GLM: GLM_GTC_epsilon extension included")
@ -30,7 +30,7 @@ namespace glm
/// True if this expression is satisfied. /// True if this expression is satisfied.
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const & epsilon); GLM_FUNC_DECL vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const & epsilon);
/// Returns the component-wise comparison of |x - y| < epsilon. /// Returns the component-wise comparison of |x - y| < epsilon.
@ -44,7 +44,7 @@ namespace glm
/// True if this expression is not satisfied. /// True if this expression is not satisfied.
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const & epsilon); GLM_FUNC_DECL vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const & epsilon);
/// Returns the component-wise comparison of |x - y| >= epsilon. /// Returns the component-wise comparison of |x - y| >= epsilon.

View File

@ -33,13 +33,13 @@ namespace glm
return abs(x - y) < epsilon; return abs(x - y) < epsilon;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const& epsilon) GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const& epsilon)
{ {
return lessThan(abs(x - y), vec<L, T, P>(epsilon)); return lessThan(abs(x - y), vec<L, T, P>(epsilon));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, T, P> const& epsilon) GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, T, P> const& epsilon)
{ {
return lessThan(abs(x - y), vec<L, T, P>(epsilon)); return lessThan(abs(x - y), vec<L, T, P>(epsilon));
@ -57,26 +57,26 @@ namespace glm
return abs(x - y) >= epsilon; return abs(x - y) >= epsilon;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const& epsilon) GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, T const& epsilon)
{ {
return greaterThanEqual(abs(x - y), vec<L, T, P>(epsilon)); return greaterThanEqual(abs(x - y), vec<L, T, P>(epsilon));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, T, P> const& epsilon) GLM_FUNC_QUALIFIER vec<L, bool, P> epsilonNotEqual(vec<L, T, P> const& x, vec<L, T, P> const& y, vec<L, T, P> const& epsilon)
{ {
return greaterThanEqual(abs(x - y), vec<L, T, P>(epsilon)); return greaterThanEqual(abs(x - y), vec<L, T, P>(epsilon));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual(tquat<T, P> const& x, tquat<T, P> const & y, T const& epsilon) GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual(tquat<T, P> const& x, tquat<T, P> const & y, T const& epsilon)
{ {
vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
return lessThan(abs(v), vec<4, T, P>(epsilon)); return lessThan(abs(v), vec<4, T, P>(epsilon));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonNotEqual(tquat<T, P> const& x, tquat<T, P> const& y, T const& epsilon) GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonNotEqual(tquat<T, P> const& x, tquat<T, P> const& y, T const& epsilon)
{ {
vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); vec<4, T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/type_vec2.hpp" #include "../detail/type_vec2.hpp"
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
@ -39,7 +39,7 @@ namespace glm
/// 2D gauss function /// 2D gauss function
/// ///
/// @see gtc_epsilon /// @see gtc_epsilon
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T gauss( GLM_FUNC_DECL T gauss(
vec<2, T, P> const& Coord, vec<2, T, P> const& Coord,
vec<2, T, P> const& ExpectedValue, vec<2, T, P> const& ExpectedValue,

View File

@ -16,7 +16,7 @@ namespace glm
return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast<T>(6.28318530717958647692528676655900576))); return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast<T>(6.28318530717958647692528676655900576)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T gauss GLM_FUNC_QUALIFIER T gauss
( (
vec<2, T, P> const& Coord, vec<2, T, P> const& Coord,

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/func_common.hpp" #include "../detail/func_common.hpp"
#include "../detail/func_integer.hpp" #include "../detail/func_integer.hpp"
#include "../detail/func_exponential.hpp" #include "../detail/func_exponential.hpp"
@ -54,7 +54,7 @@ namespace glm
/// @see gtc_integer /// @see gtc_integer
/// @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>
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, T y); GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, T y);
/// Modulus. Returns x % y /// Modulus. Returns x % y
@ -65,7 +65,7 @@ namespace glm
/// @see gtc_integer /// @see gtc_integer
/// @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>
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y); GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
@ -77,7 +77,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, int, P> iround(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, int, P> iround(vec<L, T, P> const& x);
/// Returns a value equal to the nearest integer to x. /// Returns a value equal to the nearest integer to x.
@ -89,7 +89,7 @@ namespace glm
/// ///
/// @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, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, uint, P> uround(vec<L, T, P> const& x); GLM_FUNC_DECL vec<L, uint, P> uround(vec<L, T, P> const& x);
/// @} /// @}

View File

@ -4,7 +4,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t L, typename T, precision P, bool Aligned> template<length_t L, typename T, qualifier P, bool Aligned>
struct compute_log2<L, T, P, false, Aligned> struct compute_log2<L, T, P, false, Aligned>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v)
@ -16,7 +16,7 @@ namespace detail
}; };
# if GLM_HAS_BITSCAN_WINDOWS # if GLM_HAS_BITSCAN_WINDOWS
template<precision P, bool Aligned> template<qualifier P, bool Aligned>
struct compute_log2<4, int, P, false, Aligned> struct compute_log2<4, int, P, false, Aligned>
{ {
GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v) GLM_FUNC_QUALIFIER static vec<4, int, P> call(vec<4, int, P> const& v)
@ -40,7 +40,7 @@ namespace detail
return static_cast<int>(x + static_cast<genType>(0.5)); return static_cast<int>(x + static_cast<genType>(0.5));
} }
template<glm::length_t L, typename T, precision P> template<glm::length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, int, P> iround(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, int, P> iround(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'iround' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'iround' only accept floating-point inputs");
@ -58,7 +58,7 @@ namespace detail
return static_cast<uint>(x + static_cast<genType>(0.5)); return static_cast<uint>(x + static_cast<genType>(0.5));
} }
template<glm::length_t L, typename T, precision P> template<glm::length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, uint, P> uround(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER vec<L, uint, P> uround(vec<L, T, P> const& x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'uround' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'uround' only accept floating-point inputs");

View File

@ -31,300 +31,300 @@ namespace glm
/// @addtogroup gtc_matrix_integer /// @addtogroup gtc_matrix_integer
/// @{ /// @{
/// High-precision signed integer 2x2 matrix. /// High-qualifier signed integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, int, highp> highp_imat2; typedef mat<2, 2, int, highp> highp_imat2;
/// High-precision signed integer 3x3 matrix. /// High-qualifier signed integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, int, highp> highp_imat3; typedef mat<3, 3, int, highp> highp_imat3;
/// High-precision signed integer 4x4 matrix. /// High-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, highp> highp_imat4; typedef mat<4, 4, int, highp> highp_imat4;
/// High-precision signed integer 2x2 matrix. /// High-qualifier signed integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, int, highp> highp_imat2x2; typedef mat<2, 2, int, highp> highp_imat2x2;
/// High-precision signed integer 2x3 matrix. /// High-qualifier signed integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, int, highp> highp_imat2x3; typedef mat<2, 3, int, highp> highp_imat2x3;
/// High-precision signed integer 2x4 matrix. /// High-qualifier signed integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, int, highp> highp_imat2x4; typedef mat<2, 4, int, highp> highp_imat2x4;
/// High-precision signed integer 3x2 matrix. /// High-qualifier signed integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, int, highp> highp_imat3x2; typedef mat<3, 2, int, highp> highp_imat3x2;
/// High-precision signed integer 3x3 matrix. /// High-qualifier signed integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, int, highp> highp_imat3x3; typedef mat<3, 3, int, highp> highp_imat3x3;
/// High-precision signed integer 3x4 matrix. /// High-qualifier signed integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, int, highp> highp_imat3x4; typedef mat<3, 4, int, highp> highp_imat3x4;
/// High-precision signed integer 4x2 matrix. /// High-qualifier signed integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, int, highp> highp_imat4x2; typedef mat<4, 2, int, highp> highp_imat4x2;
/// High-precision signed integer 4x3 matrix. /// High-qualifier signed integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, int, highp> highp_imat4x3; typedef mat<4, 3, int, highp> highp_imat4x3;
/// High-precision signed integer 4x4 matrix. /// High-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, highp> highp_imat4x4; typedef mat<4, 4, int, highp> highp_imat4x4;
/// Medium-precision signed integer 2x2 matrix. /// Medium-qualifier signed integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, int, mediump> mediump_imat2; typedef mat<2, 2, int, mediump> mediump_imat2;
/// Medium-precision signed integer 3x3 matrix. /// Medium-qualifier signed integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, int, mediump> mediump_imat3; typedef mat<3, 3, int, mediump> mediump_imat3;
/// Medium-precision signed integer 4x4 matrix. /// Medium-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, mediump> mediump_imat4; typedef mat<4, 4, int, mediump> mediump_imat4;
/// Medium-precision signed integer 2x2 matrix. /// Medium-qualifier signed integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, int, mediump> mediump_imat2x2; typedef mat<2, 2, int, mediump> mediump_imat2x2;
/// Medium-precision signed integer 2x3 matrix. /// Medium-qualifier signed integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, int, mediump> mediump_imat2x3; typedef mat<2, 3, int, mediump> mediump_imat2x3;
/// Medium-precision signed integer 2x4 matrix. /// Medium-qualifier signed integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, int, mediump> mediump_imat2x4; typedef mat<2, 4, int, mediump> mediump_imat2x4;
/// Medium-precision signed integer 3x2 matrix. /// Medium-qualifier signed integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, int, mediump> mediump_imat3x2; typedef mat<3, 2, int, mediump> mediump_imat3x2;
/// Medium-precision signed integer 3x3 matrix. /// Medium-qualifier signed integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, int, mediump> mediump_imat3x3; typedef mat<3, 3, int, mediump> mediump_imat3x3;
/// Medium-precision signed integer 3x4 matrix. /// Medium-qualifier signed integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, int, mediump> mediump_imat3x4; typedef mat<3, 4, int, mediump> mediump_imat3x4;
/// Medium-precision signed integer 4x2 matrix. /// Medium-qualifier signed integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, int, mediump> mediump_imat4x2; typedef mat<4, 2, int, mediump> mediump_imat4x2;
/// Medium-precision signed integer 4x3 matrix. /// Medium-qualifier signed integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, int, mediump> mediump_imat4x3; typedef mat<4, 3, int, mediump> mediump_imat4x3;
/// Medium-precision signed integer 4x4 matrix. /// Medium-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, mediump> mediump_imat4x4; typedef mat<4, 4, int, mediump> mediump_imat4x4;
/// Low-precision 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-precision 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;
/// Low-precision signed integer 4x4 matrix. /// Low-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, lowp> lowp_imat4; typedef mat<4, 4, int, lowp> lowp_imat4;
/// Low-precision 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_imat2x2; typedef mat<2, 2, int, lowp> lowp_imat2x2;
/// Low-precision signed integer 2x3 matrix. /// Low-qualifier signed integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, int, lowp> lowp_imat2x3; typedef mat<2, 3, int, lowp> lowp_imat2x3;
/// Low-precision signed integer 2x4 matrix. /// Low-qualifier signed integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, int, lowp> lowp_imat2x4; typedef mat<2, 4, int, lowp> lowp_imat2x4;
/// Low-precision signed integer 3x2 matrix. /// Low-qualifier signed integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, int, lowp> lowp_imat3x2; typedef mat<3, 2, int, lowp> lowp_imat3x2;
/// Low-precision 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_imat3x3; typedef mat<3, 3, int, lowp> lowp_imat3x3;
/// Low-precision signed integer 3x4 matrix. /// Low-qualifier signed integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, int, lowp> lowp_imat3x4; typedef mat<3, 4, int, lowp> lowp_imat3x4;
/// Low-precision signed integer 4x2 matrix. /// Low-qualifier signed integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, int, lowp> lowp_imat4x2; typedef mat<4, 2, int, lowp> lowp_imat4x2;
/// Low-precision signed integer 4x3 matrix. /// Low-qualifier signed integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, int, lowp> lowp_imat4x3; typedef mat<4, 3, int, lowp> lowp_imat4x3;
/// Low-precision signed integer 4x4 matrix. /// Low-qualifier signed integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, int, lowp> lowp_imat4x4; typedef mat<4, 4, int, lowp> lowp_imat4x4;
/// High-precision 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-precision unsigned integer 3x3 matrix. /// High-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, uint, highp> highp_umat3; typedef mat<3, 3, uint, highp> highp_umat3;
/// High-precision unsigned integer 4x4 matrix. /// High-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, highp> highp_umat4; typedef mat<4, 4, uint, highp> highp_umat4;
/// High-precision 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_umat2x2; typedef mat<2, 2, uint, highp> highp_umat2x2;
/// High-precision unsigned integer 2x3 matrix. /// High-qualifier unsigned integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, uint, highp> highp_umat2x3; typedef mat<2, 3, uint, highp> highp_umat2x3;
/// High-precision unsigned integer 2x4 matrix. /// High-qualifier unsigned integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, uint, highp> highp_umat2x4; typedef mat<2, 4, uint, highp> highp_umat2x4;
/// High-precision unsigned integer 3x2 matrix. /// High-qualifier unsigned integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, uint, highp> highp_umat3x2; typedef mat<3, 2, uint, highp> highp_umat3x2;
/// High-precision unsigned integer 3x3 matrix. /// High-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, uint, highp> highp_umat3x3; typedef mat<3, 3, uint, highp> highp_umat3x3;
/// High-precision unsigned integer 3x4 matrix. /// High-qualifier unsigned integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, uint, highp> highp_umat3x4; typedef mat<3, 4, uint, highp> highp_umat3x4;
/// High-precision unsigned integer 4x2 matrix. /// High-qualifier unsigned integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, uint, highp> highp_umat4x2; typedef mat<4, 2, uint, highp> highp_umat4x2;
/// High-precision unsigned integer 4x3 matrix. /// High-qualifier unsigned integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, uint, highp> highp_umat4x3; typedef mat<4, 3, uint, highp> highp_umat4x3;
/// High-precision unsigned integer 4x4 matrix. /// High-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, highp> highp_umat4x4; typedef mat<4, 4, uint, highp> highp_umat4x4;
/// Medium-precision unsigned integer 2x2 matrix. /// Medium-qualifier unsigned integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, uint, mediump> mediump_umat2; typedef mat<2, 2, uint, mediump> mediump_umat2;
/// Medium-precision unsigned integer 3x3 matrix. /// Medium-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, uint, mediump> mediump_umat3; typedef mat<3, 3, uint, mediump> mediump_umat3;
/// Medium-precision unsigned integer 4x4 matrix. /// Medium-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, mediump> mediump_umat4; typedef mat<4, 4, uint, mediump> mediump_umat4;
/// Medium-precision unsigned integer 2x2 matrix. /// Medium-qualifier unsigned integer 2x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 2, uint, mediump> mediump_umat2x2; typedef mat<2, 2, uint, mediump> mediump_umat2x2;
/// Medium-precision unsigned integer 2x3 matrix. /// Medium-qualifier unsigned integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, uint, mediump> mediump_umat2x3; typedef mat<2, 3, uint, mediump> mediump_umat2x3;
/// Medium-precision unsigned integer 2x4 matrix. /// Medium-qualifier unsigned integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, uint, mediump> mediump_umat2x4; typedef mat<2, 4, uint, mediump> mediump_umat2x4;
/// Medium-precision unsigned integer 3x2 matrix. /// Medium-qualifier unsigned integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, uint, mediump> mediump_umat3x2; typedef mat<3, 2, uint, mediump> mediump_umat3x2;
/// Medium-precision unsigned integer 3x3 matrix. /// Medium-qualifier unsigned integer 3x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 3, uint, mediump> mediump_umat3x3; typedef mat<3, 3, uint, mediump> mediump_umat3x3;
/// Medium-precision unsigned integer 3x4 matrix. /// Medium-qualifier unsigned integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, uint, mediump> mediump_umat3x4; typedef mat<3, 4, uint, mediump> mediump_umat3x4;
/// Medium-precision unsigned integer 4x2 matrix. /// Medium-qualifier unsigned integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, uint, mediump> mediump_umat4x2; typedef mat<4, 2, uint, mediump> mediump_umat4x2;
/// Medium-precision unsigned integer 4x3 matrix. /// Medium-qualifier unsigned integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, uint, mediump> mediump_umat4x3; typedef mat<4, 3, uint, mediump> mediump_umat4x3;
/// Medium-precision unsigned integer 4x4 matrix. /// Medium-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, mediump> mediump_umat4x4; typedef mat<4, 4, uint, mediump> mediump_umat4x4;
/// Low-precision 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-precision 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;
/// Low-precision unsigned integer 4x4 matrix. /// Low-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, lowp> lowp_umat4; typedef mat<4, 4, uint, lowp> lowp_umat4;
/// Low-precision 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_umat2x2; typedef mat<2, 2, uint, lowp> lowp_umat2x2;
/// Low-precision unsigned integer 2x3 matrix. /// Low-qualifier unsigned integer 2x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 3, uint, lowp> lowp_umat2x3; typedef mat<2, 3, uint, lowp> lowp_umat2x3;
/// Low-precision unsigned integer 2x4 matrix. /// Low-qualifier unsigned integer 2x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<2, 4, uint, lowp> lowp_umat2x4; typedef mat<2, 4, uint, lowp> lowp_umat2x4;
/// Low-precision unsigned integer 3x2 matrix. /// Low-qualifier unsigned integer 3x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 2, uint, lowp> lowp_umat3x2; typedef mat<3, 2, uint, lowp> lowp_umat3x2;
/// Low-precision 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_umat3x3; typedef mat<3, 3, uint, lowp> lowp_umat3x3;
/// Low-precision unsigned integer 3x4 matrix. /// Low-qualifier unsigned integer 3x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<3, 4, uint, lowp> lowp_umat3x4; typedef mat<3, 4, uint, lowp> lowp_umat3x4;
/// Low-precision unsigned integer 4x2 matrix. /// Low-qualifier unsigned integer 4x2 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 2, uint, lowp> lowp_umat4x2; typedef mat<4, 2, uint, lowp> lowp_umat4x2;
/// Low-precision unsigned integer 4x3 matrix. /// Low-qualifier unsigned integer 4x3 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 3, uint, lowp> lowp_umat4x3; typedef mat<4, 3, uint, lowp> lowp_umat4x3;
/// Low-precision unsigned integer 4x4 matrix. /// Low-qualifier unsigned integer 4x4 matrix.
/// @see gtc_matrix_integer /// @see gtc_matrix_integer
typedef mat<4, 4, uint, lowp> lowp_umat4x4; typedef mat<4, 4, uint, lowp> lowp_umat4x4;

View File

@ -30,7 +30,7 @@ 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-precision 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);
@ -38,7 +38,7 @@ namespace glm
/// 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-precision 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 inverseTranspose(genType const & m); GLM_FUNC_DECL genType inverseTranspose(genType const & m);

View File

@ -3,7 +3,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> affineInverse(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> affineInverse(mat<3, 3, T, P> const & m)
{ {
mat<2, 2, T, P> const Inv(inverse(mat<2, 2, T, P>(m))); mat<2, 2, T, P> const Inv(inverse(mat<2, 2, T, P>(m)));
@ -14,7 +14,7 @@ namespace glm
vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast<T>(1))); vec<3, T, P>(-Inv * vec<2, T, P>(m[2]), static_cast<T>(1)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> affineInverse(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> affineInverse(mat<4, 4, T, P> const & m)
{ {
mat<3, 3, T, P> const Inv(inverse(mat<3, 3, T, P>(m))); mat<3, 3, T, P> const Inv(inverse(mat<3, 3, T, P>(m)));
@ -26,7 +26,7 @@ namespace glm
vec<4, T, P>(-Inv * vec<3, T, P>(m[3]), static_cast<T>(1))); vec<4, T, P>(-Inv * vec<3, T, P>(m[3]), static_cast<T>(1)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<2, 2, T, P> inverseTranspose(mat<2, 2, T, P> const & m) GLM_FUNC_QUALIFIER mat<2, 2, T, P> inverseTranspose(mat<2, 2, T, P> const & m)
{ {
T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
@ -40,7 +40,7 @@ namespace glm
return Inverse; return Inverse;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> inverseTranspose(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER mat<3, 3, T, P> inverseTranspose(mat<3, 3, T, P> const & m)
{ {
T Determinant = T Determinant =
@ -63,7 +63,7 @@ namespace glm
return Inverse; return Inverse;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> inverseTranspose(mat<4, 4, T, P> const & m) GLM_FUNC_QUALIFIER mat<4, 4, T, P> inverseTranspose(mat<4, 4, T, P> const & m)
{ {
T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];

View File

@ -54,7 +54,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - translate(mat<4, 4, T, P> const & m, T x, T y, T z) /// @see - translate(mat<4, 4, T, P> const & m, T x, T y, T z)
/// @see - translate(vec<3, T, P> const & v) /// @see - translate(vec<3, T, P> const & v)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> translate( GLM_FUNC_DECL mat<4, 4, T, P> translate(
mat<4, 4, T, P> const& m, mat<4, 4, T, P> const& m,
vec<3, T, P> const & v); vec<3, T, P> const & v);
@ -68,7 +68,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - rotate(mat<4, 4, T, P> const & m, T angle, T x, T y, T z) /// @see - rotate(mat<4, 4, T, P> const & m, T angle, T x, T y, T z)
/// @see - rotate(T angle, vec<3, T, P> const & v) /// @see - rotate(T angle, vec<3, T, P> const & v)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> rotate( GLM_FUNC_DECL mat<4, 4, T, P> rotate(
mat<4, 4, T, P> const& m, mat<4, 4, T, P> const& m,
T angle, T angle,
@ -82,7 +82,7 @@ namespace glm
/// @see gtc_matrix_transform /// @see gtc_matrix_transform
/// @see - scale(mat<4, 4, T, P> const & m, T x, T y, T z) /// @see - scale(mat<4, 4, T, P> const & m, T x, T y, T z)
/// @see - scale(vec<3, T, P> const & v) /// @see - scale(vec<3, T, P> const & v)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> scale( GLM_FUNC_DECL mat<4, 4, T, P> scale(
mat<4, 4, T, P> const& m, mat<4, 4, T, P> const& m,
vec<3, T, P> const & v); vec<3, T, P> const & v);
@ -382,7 +382,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
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<3, T, P> project( GLM_FUNC_DECL vec<3, T, P> project(
vec<3, T, P> const & obj, vec<3, T, P> const & obj,
mat<4, 4, T, P> const& model, mat<4, 4, T, P> const& model,
@ -399,7 +399,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
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<3, T, P> unProject( GLM_FUNC_DECL vec<3, T, P> unProject(
vec<3, T, P> const & win, vec<3, T, P> const & win,
mat<4, 4, T, P> const& model, mat<4, 4, T, P> const& model,
@ -414,7 +414,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
template<typename T, precision P, typename U> template<typename T, qualifier P, typename U>
GLM_FUNC_DECL mat<4, 4, T, P> pickMatrix( GLM_FUNC_DECL mat<4, 4, T, P> pickMatrix(
vec<2, T, P> const & center, vec<2, T, P> const & center,
vec<2, T, P> const & delta, vec<2, T, P> const & delta,
@ -427,7 +427,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)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> lookAt( GLM_FUNC_DECL mat<4, 4, T, P> lookAt(
vec<3, T, P> const & eye, vec<3, T, P> const & eye,
vec<3, T, P> const & center, vec<3, T, P> const & center,
@ -440,7 +440,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)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> lookAtRH( GLM_FUNC_DECL mat<4, 4, T, P> lookAtRH(
vec<3, T, P> const & eye, vec<3, T, P> const & eye,
vec<3, T, P> const & center, vec<3, T, P> const & center,
@ -453,7 +453,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)
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> lookAtLH( GLM_FUNC_DECL mat<4, 4, T, P> lookAtLH(
vec<3, T, P> const & eye, vec<3, T, P> const & eye,
vec<3, T, P> const & center, vec<3, T, P> const & center,

View File

@ -7,7 +7,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(mat<4, 4, T, P> const & m, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
{ {
mat<4, 4, T, P> Result(m); mat<4, 4, T, P> Result(m);
@ -15,7 +15,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v)
{ {
T const a = angle; T const a = angle;
@ -46,7 +46,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate_slow(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate_slow(mat<4, 4, T, P> const & m, T angle, vec<3, T, P> const & v)
{ {
T const a = angle; T const a = angle;
@ -75,7 +75,7 @@ namespace glm
return m * Result; return m * Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(mat<4, 4, T, P> const & m, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
{ {
mat<4, 4, T, P> Result; mat<4, 4, T, P> Result;
@ -86,7 +86,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale_slow(mat<4, 4, T, P> const & m, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale_slow(mat<4, 4, T, P> const & m, vec<3, T, P> const & v)
{ {
mat<4, 4, T, P> Result(T(1)); mat<4, 4, T, P> Result(T(1));
@ -435,7 +435,7 @@ namespace glm
return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>()); return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
} }
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> project GLM_FUNC_QUALIFIER vec<3, T, P> project
( (
vec<3, T, P> const & obj, vec<3, T, P> const & obj,
@ -461,7 +461,7 @@ namespace glm
return vec<3, T, P>(tmp); return vec<3, T, P>(tmp);
} }
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> unProject GLM_FUNC_QUALIFIER vec<3, T, P> unProject
( (
vec<3, T, P> const & win, vec<3, T, P> const & win,
@ -488,7 +488,7 @@ namespace glm
return vec<3, T, P>(obj); return vec<3, T, P>(obj);
} }
template<typename T, precision P, typename U> template<typename T, qualifier P, typename U>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport) GLM_FUNC_QUALIFIER mat<4, 4, T, P> pickMatrix(vec<2, T, P> const & center, vec<2, T, P> const & delta, vec<4, U, P> const & viewport)
{ {
assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)); assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
@ -507,7 +507,7 @@ namespace glm
return scale(Result, vec<3, T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1))); return scale(Result, vec<3, T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up) GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAt(vec<3, T, P> const & eye, vec<3, T, P> const & center, vec<3, T, P> const & up)
{ {
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
@ -517,7 +517,7 @@ namespace glm
# endif # endif
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtRH GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtRH
( (
vec<3, T, P> const & eye, vec<3, T, P> const & eye,
@ -545,7 +545,7 @@ namespace glm
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtLH GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtLH
( (
vec<3, T, P> const & eye, vec<3, T, P> const & eye,

View File

@ -17,7 +17,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/_noise.hpp" #include "../detail/_noise.hpp"
#include "../geometric.hpp" #include "../geometric.hpp"
#include "../common.hpp" #include "../common.hpp"
@ -37,22 +37,22 @@ namespace glm
/// Classic perlin noise. /// Classic perlin noise.
/// @see gtc_noise /// @see gtc_noise
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T perlin( GLM_FUNC_DECL T perlin(
vecType<L, T, P> const& p); vec<L, T, P> const& p);
/// Periodic perlin noise. /// Periodic perlin noise.
/// @see gtc_noise /// @see gtc_noise
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T perlin( GLM_FUNC_DECL T perlin(
vecType<L, T, P> const& p, vec<L, T, P> const& p,
vecType<L, T, P> const& rep); vec<L, T, P> const& rep);
/// Simplex noise. /// Simplex noise.
/// @see gtc_noise /// @see gtc_noise
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL T simplex( GLM_FUNC_DECL T simplex(
vecType<L, T, P> const& p); vec<L, T, P> const& p);
/// @} /// @}
}//namespace glm }//namespace glm

View File

@ -9,7 +9,7 @@
namespace glm{ namespace glm{
namespace gtc namespace gtc
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> grad4(T const & j, vec<4, T, P> const & ip) GLM_FUNC_QUALIFIER vec<4, T, P> grad4(T const & j, vec<4, T, P> const & ip)
{ {
vec<3, T, P> pXYZ = floor(fract(vec<3, T, P>(j) * vec<3, T, P>(ip)) * T(7)) * ip[2] - T(1); vec<3, T, P> pXYZ = floor(fract(vec<3, T, P>(j) * vec<3, T, P>(ip)) * T(7)) * ip[2] - T(1);
@ -21,7 +21,7 @@ namespace gtc
}//namespace gtc }//namespace gtc
// Classic Perlin noise // Classic Perlin noise
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position) GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position)
{ {
vec<4, T, P> Pi = glm::floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0); vec<4, T, P> Pi = glm::floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0);
@ -62,7 +62,7 @@ namespace gtc
} }
// Classic Perlin noise // Classic Perlin noise
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position) GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position)
{ {
vec<3, T, P> Pi0 = floor(Position); // Integer part for indexing vec<3, T, P> Pi0 = floor(Position); // Integer part for indexing
@ -133,7 +133,7 @@ namespace gtc
} }
/* /*
// Classic Perlin noise // Classic Perlin noise
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & P) GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & P)
{ {
vec<3, T, P> Pi0 = floor(P); // Integer part for indexing vec<3, T, P> Pi0 = floor(P); // Integer part for indexing
@ -206,7 +206,7 @@ namespace gtc
} }
*/ */
// Classic Perlin noise // Classic Perlin noise
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position) GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position)
{ {
vec<4, T, P> Pi0 = floor(Position); // Integer part for indexing vec<4, T, P> Pi0 = floor(Position); // Integer part for indexing
@ -342,7 +342,7 @@ namespace gtc
} }
// Classic Perlin noise, periodic variant // Classic Perlin noise, periodic variant
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position, vec<2, T, P> const & rep) GLM_FUNC_QUALIFIER T perlin(vec<2, T, P> const & Position, vec<2, T, P> const & rep)
{ {
vec<4, T, P> Pi = floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0); vec<4, T, P> Pi = floor(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) + vec<4, T, P>(0.0, 0.0, 1.0, 1.0);
@ -384,7 +384,7 @@ namespace gtc
} }
// Classic Perlin noise, periodic variant // Classic Perlin noise, periodic variant
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position, vec<3, T, P> const & rep) GLM_FUNC_QUALIFIER T perlin(vec<3, T, P> const & Position, vec<3, T, P> const & rep)
{ {
vec<3, T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period vec<3, T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period
@ -455,7 +455,7 @@ namespace gtc
} }
// Classic Perlin noise, periodic version // Classic Perlin noise, periodic version
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position, vec<4, T, P> const & rep) GLM_FUNC_QUALIFIER T perlin(vec<4, T, P> const & Position, vec<4, T, P> const & rep)
{ {
vec<4, T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep vec<4, T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep
@ -588,7 +588,7 @@ namespace gtc
return T(2.2) * n_xyzw; return T(2.2) * n_xyzw;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T simplex(glm::vec<2, T, P> const & v) GLM_FUNC_QUALIFIER T simplex(glm::vec<2, T, P> const & v)
{ {
vec<4, T, P> const C = vec<4, T, P>( vec<4, T, P> const C = vec<4, T, P>(
@ -645,7 +645,7 @@ namespace gtc
return T(130) * dot(m, g); return T(130) * dot(m, g);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T simplex(vec<3, T, P> const & v) GLM_FUNC_QUALIFIER T simplex(vec<3, T, P> const & v)
{ {
vec<2, T, P> const C(1.0 / 6.0, 1.0 / 3.0); vec<2, T, P> const C(1.0 / 6.0, 1.0 / 3.0);
@ -720,7 +720,7 @@ namespace gtc
return T(42) * dot(m * m, vec<4, T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); return T(42) * dot(m * m, vec<4, T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T simplex(vec<4, T, P> const & v) GLM_FUNC_QUALIFIER T simplex(vec<4, T, P> const & v)
{ {
vec<4, T, P> const C( vec<4, T, P> const C(

View File

@ -477,7 +477,7 @@ namespace glm
/// @see gtc_packing /// @see gtc_packing
/// @see vec<3, T, P> unpackRGBM(vec<4, T, P> const & p) /// @see vec<3, T, P> unpackRGBM(vec<4, T, P> 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>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> packRGBM(vec<3, T, P> const & rgb); GLM_FUNC_DECL vec<4, T, P> packRGBM(vec<3, T, P> const & rgb);
/// 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.
@ -487,7 +487,7 @@ namespace glm
/// @see gtc_packing /// @see gtc_packing
/// @see vec<4, T, P> packRGBM(vec<3, float, P> const & v) /// @see vec<4, T, P> packRGBM(vec<3, float, P> 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>
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm); GLM_FUNC_DECL vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm);
/// 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
@ -496,47 +496,47 @@ namespace glm
/// 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 vecType<L, float, P> unpackHalf(vecType<L, uint16, P> const & p) /// @see vec<L, float, P> unpackHalf(vec<L, uint16, P> 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>
template<length_t L, precision P, template<length_t, typename, precision> class vecType> template<length_t L, qualifier P>
GLM_FUNC_DECL vecType<L, uint16, P> packHalf(vecType<L, float, P> const & v); GLM_FUNC_DECL vec<L, uint16, P> packHalf(vec<L, float, P> const & v);
/// 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 vecType<L, uint16, P> packHalf(vecType<L, float, P> const & v) /// @see vec<L, uint16, P> packHalf(vec<L, float, P> 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>
template<length_t L, precision P, template<length_t, typename, precision> class vecType> template<length_t L, qualifier P>
GLM_FUNC_DECL vecType<L, float, P> unpackHalf(vecType<L, uint16, P> const & p); GLM_FUNC_DECL vec<L, float, P> unpackHalf(vec<L, uint16, P> const & p);
/// Convert each component of the normalized floating-point vector into unsigned integer values. /// Convert each component of the normalized floating-point vector into unsigned integer values.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vecType<L, floatType, P> unpackUnorm(vecType<L, intType, P> const & p); /// @see vec<L, floatType, P> unpackUnorm(vec<L, intType, P> const & p);
template<typename uintType, length_t L, typename floatType, precision P> template<typename uintType, length_t L, typename floatType, qualifier P>
GLM_FUNC_DECL vec<L, uintType, P> packUnorm(vec<L, floatType, P> const & v); GLM_FUNC_DECL vec<L, uintType, P> packUnorm(vec<L, floatType, P> 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 vecType<L, intType, P> packUnorm(vecType<L, floatType, P> const & v) /// @see vec<L, intType, P> packUnorm(vec<L, floatType, P> const & v)
template<typename floatType, length_t L, typename uintType, precision P> template<typename floatType, length_t L, typename uintType, qualifier P>
GLM_FUNC_DECL vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const & v); GLM_FUNC_DECL vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const & v);
/// Convert each component of the normalized floating-point vector into signed integer values. /// Convert each component of the normalized floating-point vector into signed integer values.
/// ///
/// @see gtc_packing /// @see gtc_packing
/// @see vecType<L, floatType, P> unpackSnorm(vecType<L, intType, P> const & p); /// @see vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & p);
template<typename intType, length_t L, typename floatType, precision P> template<typename intType, length_t L, typename floatType, qualifier P>
GLM_FUNC_DECL vec<L, intType, P> packSnorm(vec<L, floatType, P> const & v); GLM_FUNC_DECL vec<L, intType, P> packSnorm(vec<L, floatType, P> 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 vecType<L, intType, P> packSnorm(vecType<L, floatType, P> const & v) /// @see vec<L, intType, P> packSnorm(vec<L, floatType, P> const & v)
template<typename floatType, length_t L, typename intType, precision P> template<typename floatType, length_t L, typename intType, qualifier P>
GLM_FUNC_DECL vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v); GLM_FUNC_DECL vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v);
/// Convert each component of the normalized floating-point vector into unsigned integer values. /// Convert each component of the normalized floating-point vector into unsigned integer values.

View File

@ -271,12 +271,12 @@ namespace detail
uint32 pack; uint32 pack;
}; };
template<length_t L, precision P, template<length_t, typename, precision> class vecType> template<length_t L, qualifier P>
struct compute_half struct compute_half
{}; {};
template<precision P> template<qualifier P>
struct compute_half<1, P, vec> struct compute_half<1, P>
{ {
GLM_FUNC_QUALIFIER static vec<1, uint16, P> pack(vec<1, float, P> const & v) GLM_FUNC_QUALIFIER static vec<1, uint16, P> pack(vec<1, float, P> const & v)
{ {
@ -294,8 +294,8 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_half<2, P, vec> struct compute_half<2, P>
{ {
GLM_FUNC_QUALIFIER static vec<2, uint16, P> pack(vec<2, float, P> const & v) GLM_FUNC_QUALIFIER static vec<2, uint16, P> pack(vec<2, float, P> const & v)
{ {
@ -313,8 +313,8 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_half<3, P, vec> struct compute_half<3, P>
{ {
GLM_FUNC_QUALIFIER static vec<3, uint16, P> pack(vec<3, float, P> const & v) GLM_FUNC_QUALIFIER static vec<3, uint16, P> pack(vec<3, float, P> const & v)
{ {
@ -332,8 +332,8 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_half<4, P, vec> struct compute_half<4, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint16, P> pack(vec<4, float, P> const & v) GLM_FUNC_QUALIFIER static vec<4, uint16, P> pack(vec<4, float, P> const & v)
{ {
@ -641,7 +641,7 @@ namespace detail
} }
// Based on Brian Karis http://graphicrants.blogspot.fr/2009/04/rgbm-color-encoding.html // Based on Brian Karis http://graphicrants.blogspot.fr/2009/04/rgbm-color-encoding.html
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> packRGBM(vec<3, T, P> const & rgb) GLM_FUNC_QUALIFIER vec<4, T, P> packRGBM(vec<3, T, P> const & rgb)
{ {
vec<3, T, P> const Color(rgb * static_cast<T>(1.0 / 6.0)); vec<3, T, P> const Color(rgb * static_cast<T>(1.0 / 6.0));
@ -650,25 +650,25 @@ namespace detail
return vec<4, T, P>(Color / Alpha, Alpha); return vec<4, T, P>(Color / Alpha, Alpha);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm) GLM_FUNC_QUALIFIER vec<3, T, P> unpackRGBM(vec<4, T, P> const & rgbm)
{ {
return vec<3, T, P>(rgbm.x, rgbm.y, rgbm.z) * rgbm.w * static_cast<T>(6); return vec<3, T, P>(rgbm.x, rgbm.y, rgbm.z) * rgbm.w * static_cast<T>(6);
} }
template<length_t L, precision P, template<length_t, typename, precision> class vecType> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, uint16, P> packHalf(vecType<L, float, P> const & v) GLM_FUNC_QUALIFIER vec<L, uint16, P> packHalf(vec<L, float, P> const & v)
{ {
return detail::compute_half<L, P, vecType>::pack(v); return detail::compute_half<L, P>::pack(v);
} }
template<length_t L, precision P, template<length_t, typename, precision> class vecType> template<length_t L, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, float, P> unpackHalf(vecType<L, uint16, P> const & v) GLM_FUNC_QUALIFIER vec<L, float, P> unpackHalf(vec<L, uint16, P> const & v)
{ {
return detail::compute_half<L, P, vecType>::unpack(v); return detail::compute_half<L, P>::unpack(v);
} }
template<typename uintType, length_t L, typename floatType, precision P> template<typename uintType, length_t L, typename floatType, qualifier P>
GLM_FUNC_QUALIFIER vec<L, uintType, P> packUnorm(vec<L, floatType, P> const& v) GLM_FUNC_QUALIFIER vec<L, uintType, P> packUnorm(vec<L, floatType, P> const& v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type");
@ -677,7 +677,7 @@ namespace detail
return vec<L, uintType, P>(round(clamp(v, static_cast<floatType>(0), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<uintType>::max()))); return vec<L, uintType, P>(round(clamp(v, static_cast<floatType>(0), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<uintType>::max())));
} }
template<typename floatType, length_t L, typename uintType, precision P> template<typename floatType, length_t L, typename uintType, qualifier P>
GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const& v) GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackUnorm(vec<L, uintType, P> const& v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits<uintType>::is_integer, "uintType must be an integer type");
@ -686,7 +686,7 @@ namespace detail
return vec<L, float, P>(v) * (static_cast<floatType>(1) / static_cast<floatType>(std::numeric_limits<uintType>::max())); return vec<L, float, P>(v) * (static_cast<floatType>(1) / static_cast<floatType>(std::numeric_limits<uintType>::max()));
} }
template<typename intType, length_t L, typename floatType, precision P> template<typename intType, length_t L, typename floatType, qualifier P>
GLM_FUNC_QUALIFIER vec<L, intType, P> packSnorm(vec<L, floatType, P> const & v) GLM_FUNC_QUALIFIER vec<L, intType, P> packSnorm(vec<L, floatType, P> const & v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<intType>::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits<intType>::is_integer, "uintType must be an integer type");
@ -695,7 +695,7 @@ namespace detail
return vec<L, intType, P>(round(clamp(v , static_cast<floatType>(-1), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<intType>::max()))); return vec<L, intType, P>(round(clamp(v , static_cast<floatType>(-1), static_cast<floatType>(1)) * static_cast<floatType>(std::numeric_limits<intType>::max())));
} }
template<typename floatType, length_t L, typename intType, precision P> template<typename floatType, length_t L, typename intType, qualifier P>
GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v) GLM_FUNC_QUALIFIER vec<L, floatType, P> unpackSnorm(vec<L, intType, P> const & v)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<intType>::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits<intType>::is_integer, "uintType must be an integer type");

View File

@ -29,7 +29,7 @@ namespace glm
/// @addtogroup gtc_quaternion /// @addtogroup gtc_quaternion
/// @{ /// @{
template<typename T, precision P = defaultp> template<typename T, qualifier P = defaultp>
struct tquat struct tquat
{ {
// -- Implementation detail -- // -- Implementation detail --
@ -79,7 +79,7 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR tquat() GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR tquat() GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, P> const& q) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, P> const& q) GLM_DEFAULT;
template<precision Q> template<qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, Q> const& q); GLM_FUNC_DECL GLM_CONSTEXPR tquat(tquat<T, Q> const& q);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
@ -89,7 +89,7 @@ namespace glm
// -- Conversion constructors -- // -- Conversion constructors --
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tquat<U, Q> const& q); GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tquat(tquat<U, Q> const& q);
/// Explicit conversion operators /// Explicit conversion operators
@ -131,47 +131,47 @@ namespace glm
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const& q); GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const& q);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const& q); GLM_FUNC_DECL tquat<T, P> operator-(tquat<T, P> const& q);
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p); GLM_FUNC_DECL tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p); GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v); GLM_FUNC_DECL vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q); GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(tquat<T, P> const & q, vec<4, T, P> const & v); GLM_FUNC_DECL vec<4, T, P> operator*(tquat<T, P> const & q, vec<4, T, P> const & v);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q); GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, T const & s); GLM_FUNC_DECL tquat<T, P> operator*(tquat<T, P> const & q, T const & s);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator*(T const & s, tquat<T, P> const & q); GLM_FUNC_DECL tquat<T, P> operator*(T const & s, tquat<T, P> const & q);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> operator/(tquat<T, P> const & q, T const & s); GLM_FUNC_DECL tquat<T, P> operator/(tquat<T, P> const & q, T const & s);
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2); GLM_FUNC_DECL bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2);
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2); GLM_FUNC_DECL bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2);
/// Returns the length of the quaternion. /// Returns the length of the quaternion.
@ -179,7 +179,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T length(tquat<T, P> const & q); GLM_FUNC_DECL T length(tquat<T, P> const & q);
/// Returns the normalized quaternion. /// Returns the normalized quaternion.
@ -187,7 +187,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> normalize(tquat<T, P> const & q); GLM_FUNC_DECL tquat<T, P> normalize(tquat<T, P> 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] + ...
@ -195,7 +195,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T dot(tquat<T, P> const & x, tquat<T, P> const & y); GLM_FUNC_DECL T dot(tquat<T, P> const & x, tquat<T, P> const & y);
/// Spherical linear interpolation of two quaternions. /// Spherical linear interpolation of two quaternions.
@ -209,7 +209,7 @@ namespace glm
/// ///
/// @see - slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a) /// @see - slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a); GLM_FUNC_DECL tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a);
/// Linear interpolation of two quaternions. /// Linear interpolation of two quaternions.
@ -221,7 +221,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a); GLM_FUNC_DECL tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
/// Spherical linear interpolation of two quaternions. /// Spherical linear interpolation of two quaternions.
@ -233,7 +233,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a); GLM_FUNC_DECL tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a);
/// Returns the q conjugate. /// Returns the q conjugate.
@ -241,7 +241,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> conjugate(tquat<T, P> const & q); GLM_FUNC_DECL tquat<T, P> conjugate(tquat<T, P> const & q);
/// Returns the q inverse. /// Returns the q inverse.
@ -249,7 +249,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> inverse(tquat<T, P> const & q); GLM_FUNC_DECL tquat<T, P> inverse(tquat<T, P> 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.
@ -260,7 +260,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & axis); GLM_FUNC_DECL tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & axis);
/// Returns euler angles, pitch as x, yaw as y, roll as z. /// Returns euler angles, pitch as x, yaw as y, roll as z.
@ -269,7 +269,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat<T, P> const & x); GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat<T, P> const & x);
/// Returns roll value of euler angles expressed in radians. /// Returns roll value of euler angles expressed in radians.
@ -277,7 +277,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T roll(tquat<T, P> const& x); GLM_FUNC_DECL T roll(tquat<T, P> const& x);
/// Returns pitch value of euler angles expressed in radians. /// Returns pitch value of euler angles expressed in radians.
@ -285,7 +285,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T pitch(tquat<T, P> const& x); GLM_FUNC_DECL T pitch(tquat<T, P> const& x);
/// Returns yaw value of euler angles expressed in radians. /// Returns yaw value of euler angles expressed in radians.
@ -293,7 +293,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T yaw(tquat<T, P> const& x); GLM_FUNC_DECL T yaw(tquat<T, P> const& x);
/// Converts a quaternion to a 3 * 3 matrix. /// Converts a quaternion to a 3 * 3 matrix.
@ -301,7 +301,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<3, 3, T, P> mat3_cast(tquat<T, P> const& x); GLM_FUNC_DECL mat<3, 3, T, P> mat3_cast(tquat<T, P> const& x);
/// Converts a quaternion to a 4 * 4 matrix. /// Converts a quaternion to a 4 * 4 matrix.
@ -309,7 +309,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL mat<4, 4, T, P> mat4_cast(tquat<T, P> const& x); GLM_FUNC_DECL mat<4, 4, T, P> mat4_cast(tquat<T, P> const& x);
/// Converts a 3 * 3 matrix to a quaternion. /// Converts a 3 * 3 matrix to a quaternion.
@ -317,7 +317,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> quat_cast(mat<3, 3, T, P> const& x); GLM_FUNC_DECL tquat<T, P> quat_cast(mat<3, 3, T, P> const& x);
/// Converts a 4 * 4 matrix to a quaternion. /// Converts a 4 * 4 matrix to a quaternion.
@ -325,7 +325,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> quat_cast(mat<4, 4, T, P> const& x); GLM_FUNC_DECL tquat<T, P> quat_cast(mat<4, 4, T, P> const& x);
/// Returns the quaternion rotation angle. /// Returns the quaternion rotation angle.
@ -333,7 +333,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T angle(tquat<T, P> const& x); GLM_FUNC_DECL T angle(tquat<T, P> const& x);
/// Returns the q rotation axis. /// Returns the q rotation axis.
@ -341,7 +341,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> axis(tquat<T, P> const& x); GLM_FUNC_DECL vec<3, T, P> axis(tquat<T, P> const& x);
/// Build a quaternion from an angle and a normalized axis. /// Build a quaternion from an angle and a normalized axis.
@ -351,7 +351,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL tquat<T, P> angleAxis(T const& angle, vec<3, T, P> const& axis); GLM_FUNC_DECL tquat<T, P> angleAxis(T const& angle, vec<3, T, P> const& axis);
/// Returns the component-wise comparison result of x < y. /// Returns the component-wise comparison result of x < y.
@ -359,7 +359,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> lessThan(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> lessThan(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns the component-wise comparison of result x <= y. /// Returns the component-wise comparison of result x <= y.
@ -367,7 +367,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> lessThanEqual(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> lessThanEqual(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns the component-wise comparison of result x > y. /// Returns the component-wise comparison of result x > y.
@ -375,7 +375,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> greaterThan(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> greaterThan(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns the component-wise comparison of result x >= y. /// Returns the component-wise comparison of result x >= y.
@ -383,7 +383,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> greaterThanEqual(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> greaterThanEqual(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns the component-wise comparison of result x == y. /// Returns the component-wise comparison of result x == y.
@ -391,7 +391,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> equal(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> equal(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns the component-wise comparison of result x != y. /// Returns the component-wise comparison of result x != y.
@ -399,7 +399,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> notEqual(tquat<T, P> const& x, tquat<T, P> const& y); GLM_FUNC_DECL vec<4, bool, P> notEqual(tquat<T, P> const& x, tquat<T, P> const& y);
/// Returns true if x holds a NaN (not a number) /// Returns true if x holds a NaN (not a number)
@ -413,7 +413,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> isnan(tquat<T, P> const& x); GLM_FUNC_DECL vec<4, bool, P> isnan(tquat<T, P> const& x);
/// Returns true if x holds a positive infinity or negative /// Returns true if x holds a positive infinity or negative
@ -425,7 +425,7 @@ namespace glm
/// @tparam T Floating-point scalar types. /// @tparam T Floating-point scalar types.
/// ///
/// @see gtc_quaternion /// @see gtc_quaternion
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, bool, P> isinf(tquat<T, P> const& x); GLM_FUNC_DECL vec<4, bool, P> isinf(tquat<T, P> const& x);
/// @} /// @}

View File

@ -11,7 +11,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_dot<tquat<T, P>, T, Aligned> struct compute_dot<tquat<T, P>, T, Aligned>
{ {
static GLM_FUNC_QUALIFIER T call(tquat<T, P> const& a, tquat<T, P> const& b) static GLM_FUNC_QUALIFIER T call(tquat<T, P> const& a, tquat<T, P> const& b)
@ -21,7 +21,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_quat_add struct compute_quat_add
{ {
static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p) static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p)
@ -30,7 +30,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_quat_sub struct compute_quat_sub
{ {
static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p) static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p)
@ -39,7 +39,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_quat_mul_scalar struct compute_quat_mul_scalar
{ {
static tquat<T, P> call(tquat<T, P> const& q, T s) static tquat<T, P> call(tquat<T, P> const& q, T s)
@ -48,7 +48,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_quat_div_scalar struct compute_quat_div_scalar
{ {
static tquat<T, P> call(tquat<T, P> const& q, T s) static tquat<T, P> call(tquat<T, P> const& q, T s)
@ -57,7 +57,7 @@ namespace detail
} }
}; };
template<typename T, precision P, bool Aligned> template<typename T, qualifier P, bool Aligned>
struct compute_quat_mul_vec4 struct compute_quat_mul_vec4
{ {
static vec<4, T, P> call(tquat<T, P> const & q, vec<4, T, P> const & v) static vec<4, T, P> call(tquat<T, P> const & q, vec<4, T, P> const & v)
@ -69,14 +69,14 @@ namespace detail
// -- Component accesses -- // -- Component accesses --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
return (&x)[i]; return (&x)[i];
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) const GLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[](typename tquat<T, P>::length_type i) const
{ {
assert(i >= 0 && i < this->length()); assert(i >= 0 && i < this->length());
@ -86,40 +86,40 @@ namespace detail
// -- Implicit basic constructors -- // -- Implicit basic constructors --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat() GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat()
{} {}
# endif # endif
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<T, P> const & q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<T, P> const & q)
: x(q.x), y(q.y), z(q.z), w(q.w) : x(q.x), y(q.y), z(q.z), w(q.w)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<precision Q> template<qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<T, Q> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<T, Q> const& q)
: x(q.x), y(q.y), z(q.z), w(q.w) : x(q.x), y(q.y), z(q.z), w(q.w)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T s, vec<3, T, P> const& v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T s, vec<3, T, P> const& v)
: x(v.x), y(v.y), z(v.z), w(s) : x(v.x), y(v.y), z(v.z), w(s)
{} {}
template <typename T, precision P> template <typename T, qualifier P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T _w, T _x, T _y, T _z) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(T _w, T _x, T _y, T _z)
: x(_x), y(_y), z(_z), w(_w) : x(_x), y(_y), z(_z), w(_w)
{} {}
// -- Conversion constructors -- // -- Conversion constructors --
template<typename T, precision P> template<typename T, qualifier P>
template<typename U, precision Q> template<typename U, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<U, Q> const& q) GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat<T, P>::tquat(tquat<U, Q> const& q)
: x(static_cast<T>(q.x)) : x(static_cast<T>(q.x))
, y(static_cast<T>(q.y)) , y(static_cast<T>(q.y))
@ -145,7 +145,7 @@ namespace detail
// this->z = c.x * c.y * s.z - s.x * s.y * c.z; // this->z = c.x * c.y * s.z - s.x * s.y * c.z;
//} //}
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& u, vec<3, T, P> const& v) GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& u, vec<3, T, P> const& v)
{ {
vec<3, T, P> const LocalW(cross(u, v)); vec<3, T, P> const LocalW(cross(u, v));
@ -155,7 +155,7 @@ namespace detail
*this = normalize(q); *this = normalize(q);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& eulerAngle) GLM_FUNC_QUALIFIER tquat<T, P>::tquat(vec<3, T, P> const& eulerAngle)
{ {
vec<3, T, P> c = glm::cos(eulerAngle * T(0.5)); vec<3, T, P> c = glm::cos(eulerAngle * T(0.5));
@ -167,39 +167,39 @@ namespace detail
this->z = c.x * c.y * s.z - s.x * s.y * c.z; this->z = c.x * c.y * s.z - s.x * s.y * c.z;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<3, 3, T, P> const& m)
{ {
*this = quat_cast(m); *this = quat_cast(m);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER tquat<T, P>::tquat(mat<4, 4, T, P> const& m)
{ {
*this = quat_cast(m); *this = quat_cast(m);
} }
# if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<3, 3, T, P>() GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<3, 3, T, P>()
{ {
return mat3_cast(*this); return mat3_cast(*this);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<4, 4, T, P>() GLM_FUNC_QUALIFIER tquat<T, P>::operator mat<4, 4, T, P>()
{ {
return mat4_cast(*this); return mat4_cast(*this);
} }
# endif//GLM_HAS_EXPLICIT_CONVERSION_OPERATORS # endif//GLM_HAS_EXPLICIT_CONVERSION_OPERATORS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> conjugate(tquat<T, P> const& q) GLM_FUNC_QUALIFIER tquat<T, P> conjugate(tquat<T, P> const& q)
{ {
return tquat<T, P>(q.w, -q.x, -q.y, -q.z); return tquat<T, P>(q.w, -q.x, -q.y, -q.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> inverse(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> inverse(tquat<T, P> const & q)
{ {
return conjugate(q) / dot(q, q); return conjugate(q) / dot(q, q);
@ -208,7 +208,7 @@ namespace detail
// -- Unary arithmetic operators -- // -- Unary arithmetic operators --
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<T, P> const & q)
{ {
this->w = q.w; this->w = q.w;
@ -219,7 +219,7 @@ namespace detail
} }
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<U, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator=(tquat<U, P> const & q)
{ {
@ -230,21 +230,21 @@ namespace detail
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const& q) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const& q)
{ {
return (*this = detail::compute_quat_add<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q))); return (*this = detail::compute_quat_add<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator-=(tquat<U, P> const& q) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator-=(tquat<U, P> const& q)
{ {
return (*this = detail::compute_quat_sub<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q))); return (*this = detail::compute_quat_sub<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(tquat<U, P> const & r) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(tquat<U, P> const & r)
{ {
@ -258,14 +258,14 @@ namespace detail
return *this; return *this;
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(U s) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(U s)
{ {
return (*this = detail::compute_quat_mul_scalar<T, P, detail::is_aligned<P>::value>::call(*this, static_cast<U>(s))); return (*this = detail::compute_quat_mul_scalar<T, P, detail::is_aligned<P>::value>::call(*this, static_cast<U>(s)));
} }
template<typename T, precision P> template<typename T, qualifier P>
template<typename U> template<typename U>
GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(U s) GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(U s)
{ {
@ -274,13 +274,13 @@ namespace detail
// -- Unary bit operators -- // -- Unary bit operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q)
{ {
return q; return q;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator-(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> operator-(tquat<T, P> const & q)
{ {
return tquat<T, P>(-q.w, -q.x, -q.y, -q.z); return tquat<T, P>(-q.w, -q.x, -q.y, -q.z);
@ -288,19 +288,19 @@ namespace detail
// -- Binary operators -- // -- Binary operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p) GLM_FUNC_QUALIFIER tquat<T, P> operator+(tquat<T, P> const & q, tquat<T, P> const & p)
{ {
return tquat<T, P>(q) += p; return tquat<T, P>(q) += p;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p) GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, tquat<T, P> const & p)
{ {
return tquat<T, P>(q) *= p; return tquat<T, P>(q) *= p;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat<T, P> const & q, vec<3, T, P> const & v)
{ {
vec<3, T, P> const QuatVector(q.x, q.y, q.z); vec<3, T, P> const QuatVector(q.x, q.y, q.z);
@ -310,38 +310,38 @@ namespace detail
return v + ((uv * q.w) + uuv) * static_cast<T>(2); return v + ((uv * q.w) + uuv) * static_cast<T>(2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q) GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tquat<T, P> const & q)
{ {
return glm::inverse(q) * v; return glm::inverse(q) * v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tquat<T, P> const& q, vec<4, T, P> const& v) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tquat<T, P> const& q, vec<4, T, P> const& v)
{ {
return detail::compute_quat_mul_vec4<T, P, detail::is_aligned<P>::value>::call(q, v); return detail::compute_quat_mul_vec4<T, P, detail::is_aligned<P>::value>::call(q, v);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q) GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tquat<T, P> const & q)
{ {
return glm::inverse(q) * v; return glm::inverse(q) * v;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, T const & s) GLM_FUNC_QUALIFIER tquat<T, P> operator*(tquat<T, P> const & q, T const & s)
{ {
return tquat<T, P>( return tquat<T, P>(
q.w * s, q.x * s, q.y * s, q.z * s); q.w * s, q.x * s, q.y * s, q.z * s);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator*(T const & s, tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> operator*(T const & s, tquat<T, P> const & q)
{ {
return q * s; return q * s;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> operator/(tquat<T, P> const & q, T const & s) GLM_FUNC_QUALIFIER tquat<T, P> operator/(tquat<T, P> const & q, T const & s)
{ {
return tquat<T, P>( return tquat<T, P>(
@ -350,13 +350,13 @@ namespace detail
// -- Boolean operators -- // -- Boolean operators --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2) GLM_FUNC_QUALIFIER bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2)
{ {
return all(epsilonEqual(q1, q2, epsilon<T>())); return all(epsilonEqual(q1, q2, epsilon<T>()));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2) GLM_FUNC_QUALIFIER bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2)
{ {
return any(epsilonNotEqual(q1, q2, epsilon<T>())); return any(epsilonNotEqual(q1, q2, epsilon<T>()));
@ -364,13 +364,13 @@ namespace detail
// -- Operations -- // -- Operations --
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T length(tquat<T, P> const & q) GLM_FUNC_QUALIFIER T length(tquat<T, P> const & q)
{ {
return glm::sqrt(dot(q, q)); return glm::sqrt(dot(q, q));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> normalize(tquat<T, P> const & q) GLM_FUNC_QUALIFIER tquat<T, P> normalize(tquat<T, P> const & q)
{ {
T len = length(q); T len = length(q);
@ -380,7 +380,7 @@ namespace detail
return tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); return tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> cross(tquat<T, P> const & q1, tquat<T, P> const & q2) GLM_FUNC_QUALIFIER tquat<T, P> cross(tquat<T, P> const & q1, tquat<T, P> const & q2)
{ {
return tquat<T, P>( return tquat<T, P>(
@ -391,7 +391,7 @@ namespace detail
} }
/* /*
// (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle))
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T const & a) GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
{ {
if(a <= T(0)) return x; if(a <= T(0)) return x;
@ -428,7 +428,7 @@ namespace detail
k0 * x.z + k1 * y2.z); k0 * x.z + k1 * y2.z);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> mix2 GLM_FUNC_QUALIFIER tquat<T, P> mix2
( (
tquat<T, P> const & x, tquat<T, P> const & x,
@ -466,7 +466,7 @@ namespace detail
} }
*/ */
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a) GLM_FUNC_QUALIFIER tquat<T, P> mix(tquat<T, P> const & x, tquat<T, P> const & y, T a)
{ {
T cosTheta = dot(x, y); T cosTheta = dot(x, y);
@ -489,7 +489,7 @@ namespace detail
} }
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a) GLM_FUNC_QUALIFIER tquat<T, P> lerp(tquat<T, P> const & x, tquat<T, P> const & y, T a)
{ {
// Lerp is only defined in [0, 1] // Lerp is only defined in [0, 1]
@ -499,7 +499,7 @@ namespace detail
return x * (T(1) - a) + (y * a); return x * (T(1) - a) + (y * a);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a) GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T a)
{ {
tquat<T, P> z = y; tquat<T, P> z = y;
@ -532,7 +532,7 @@ namespace detail
} }
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER tquat<T, P> rotate(tquat<T, P> const & q, T const & angle, vec<3, T, P> const & v)
{ {
vec<3, T, P> Tmp = v; vec<3, T, P> Tmp = v;
@ -554,19 +554,19 @@ namespace detail
//return gtc::quaternion::cross(q, tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); //return gtc::quaternion::cross(q, tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat<T, P> const & x) GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat<T, P> const & x)
{ {
return vec<3, T, P>(pitch(x), yaw(x), roll(x)); return vec<3, T, P>(pitch(x), yaw(x), roll(x));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T roll(tquat<T, P> const & q) GLM_FUNC_QUALIFIER T roll(tquat<T, P> const & q)
{ {
return static_cast<T>(atan(static_cast<T>(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); return static_cast<T>(atan(static_cast<T>(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T pitch(tquat<T, P> const & q) GLM_FUNC_QUALIFIER T pitch(tquat<T, P> const & q)
{ {
//return T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); //return T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));
@ -579,13 +579,13 @@ namespace detail
return static_cast<T>(atan(y,x)); return static_cast<T>(atan(y,x));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T yaw(tquat<T, P> const & q) GLM_FUNC_QUALIFIER T yaw(tquat<T, P> const & q)
{ {
return asin(clamp(static_cast<T>(-2) * (q.x * q.z - q.w * q.y), static_cast<T>(-1), static_cast<T>(1))); return asin(clamp(static_cast<T>(-2) * (q.x * q.z - q.w * q.y), static_cast<T>(-1), static_cast<T>(1)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat3_cast(tquat<T, P> const & q) GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat3_cast(tquat<T, P> const & q)
{ {
mat<3, 3, T, P> Result(T(1)); mat<3, 3, T, P> Result(T(1));
@ -613,13 +613,13 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat4_cast(tquat<T, P> const & q) GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat4_cast(tquat<T, P> const & q)
{ {
return mat<4, 4, T, P>(mat3_cast(q)); return mat<4, 4, T, P>(mat3_cast(q));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<3, 3, T, P> const & m) GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<3, 3, T, P> const & m)
{ {
T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];
@ -683,19 +683,19 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<4, 4, T, P> const & m4) GLM_FUNC_QUALIFIER tquat<T, P> quat_cast(mat<4, 4, T, P> const & m4)
{ {
return quat_cast(mat<3, 3, T, P>(m4)); return quat_cast(mat<3, 3, T, P>(m4));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T angle(tquat<T, P> const & x) GLM_FUNC_QUALIFIER T angle(tquat<T, P> const & x)
{ {
return acos(x.w) * static_cast<T>(2); return acos(x.w) * static_cast<T>(2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat<T, P> const & x) GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat<T, P> const & x)
{ {
T tmp1 = static_cast<T>(1) - x.w * x.w; T tmp1 = static_cast<T>(1) - x.w * x.w;
@ -705,7 +705,7 @@ namespace detail
return vec<3, T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2); return vec<3, T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER tquat<T, P> angleAxis(T const & angle, vec<3, T, P> const & v) GLM_FUNC_QUALIFIER tquat<T, P> angleAxis(T const & angle, vec<3, T, P> const & v)
{ {
tquat<T, P> Result; tquat<T, P> Result;
@ -720,7 +720,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y) GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat<T, P> const & x, tquat<T, P> const & y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -729,7 +729,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y) GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -738,7 +738,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y) GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat<T, P> const & x, tquat<T, P> const & y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -747,7 +747,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y) GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat<T, P> const & x, tquat<T, P> const & y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -756,7 +756,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat<T, P> const& x, tquat<T, P> const& y) GLM_FUNC_QUALIFIER vec<4, bool, P> equal(tquat<T, P> const& x, tquat<T, P> const& y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -765,7 +765,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat<T, P> const& x, tquat<T, P> const& y) GLM_FUNC_QUALIFIER vec<4, bool, P> notEqual(tquat<T, P> const& x, tquat<T, P> const& y)
{ {
vec<4, bool, P> Result; vec<4, bool, P> Result;
@ -774,7 +774,7 @@ namespace detail
return Result; return Result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> isnan(tquat<T, P> const& q) GLM_FUNC_QUALIFIER vec<4, bool, P> isnan(tquat<T, P> const& q)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
@ -782,7 +782,7 @@ namespace detail
return vec<4, bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w)); return vec<4, bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, bool, P> isinf(tquat<T, P> const& q) GLM_FUNC_QUALIFIER vec<4, bool, P> isinf(tquat<T, P> const& q)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs");

View File

@ -7,7 +7,7 @@ namespace glm{
namespace detail namespace detail
{ {
/* /*
template<precision P> template<qualifier P>
struct compute_quat_mul<float, P, true> struct compute_quat_mul<float, P, true>
{ {
static tquat<float, P> call(tquat<float, P> const& q1, tquat<float, P> const& q2) static tquat<float, P> call(tquat<float, P> const& q1, tquat<float, P> const& q2)
@ -61,7 +61,7 @@ namespace detail
}; };
*/ */
template<precision P> template<qualifier P>
struct compute_dot<tquat<float, P>, float, true> struct compute_dot<tquat<float, P>, float, true>
{ {
static GLM_FUNC_QUALIFIER float call(tquat<float, P> const& x, tquat<float, P> const& y) static GLM_FUNC_QUALIFIER float call(tquat<float, P> const& x, tquat<float, P> const& y)
@ -70,7 +70,7 @@ namespace detail
} }
}; };
template<precision P> template<qualifier P>
struct compute_quat_add<float, P, true> struct compute_quat_add<float, P, true>
{ {
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p) static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
@ -82,7 +82,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_quat_add<double, P, true> struct compute_quat_add<double, P, true>
{ {
static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b) static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b)
@ -94,7 +94,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_quat_sub<float, P, true> struct compute_quat_sub<float, P, true>
{ {
static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p) static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p)
@ -106,7 +106,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_quat_sub<double, P, true> struct compute_quat_sub<double, P, true>
{ {
static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b) static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b)
@ -118,7 +118,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_quat_mul_scalar<float, P, true> struct compute_quat_mul_scalar<float, P, true>
{ {
static tquat<float, P> call(tquat<float, P> const& q, float s) static tquat<float, P> call(tquat<float, P> const& q, float s)
@ -130,7 +130,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_quat_mul_scalar<double, P, true> struct compute_quat_mul_scalar<double, P, true>
{ {
static tquat<double, P> call(tquat<double, P> const& q, double s) static tquat<double, P> call(tquat<double, P> const& q, double s)
@ -142,7 +142,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_quat_div_scalar<float, P, true> struct compute_quat_div_scalar<float, P, true>
{ {
static tquat<float, P> call(tquat<float, P> const& q, float s) static tquat<float, P> call(tquat<float, P> const& q, float s)
@ -154,7 +154,7 @@ namespace detail
}; };
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template<precision P> template<qualifier P>
struct compute_quat_div_scalar<double, P, true> struct compute_quat_div_scalar<double, P, true>
{ {
static tquat<double, P> call(tquat<double, P> const& q, double s) static tquat<double, P> call(tquat<double, P> const& q, double s)
@ -166,7 +166,7 @@ namespace detail
}; };
# endif # endif
template<precision P> template<qualifier P>
struct compute_quat_mul_vec4<float, P, true> struct compute_quat_mul_vec4<float, P, true>
{ {
static vec<4, float, P> call(tquat<float, P> const& q, vec<4, float, P> const& v) static vec<4, float, P> call(tquat<float, P> const& q, vec<4, float, P> const& v)

View File

@ -40,9 +40,9 @@ namespace glm
/// @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.
/// @tparam vecType A vertor type: tvec1, tvec2, tvec3, tvec4 or compatible ///
/// @see gtc_random /// @see gtc_random
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> linearRand(vec<L, T, P> const& Min, vec<L, T, P> const& Max); GLM_FUNC_DECL vec<L, T, P> linearRand(vec<L, T, P> const& Min, vec<L, T, P> 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

View File

@ -12,13 +12,13 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template <length_t L, typename T, precision P> template <length_t L, typename T, qualifier P>
struct compute_rand struct compute_rand
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(); GLM_FUNC_QUALIFIER static vec<L, T, P> call();
}; };
template <precision P> template <qualifier P>
struct compute_rand<1, uint8, P> struct compute_rand<1, uint8, P>
{ {
GLM_FUNC_QUALIFIER static vec<1, uint8, P> call() GLM_FUNC_QUALIFIER static vec<1, uint8, P> call()
@ -28,7 +28,7 @@ namespace detail
} }
}; };
template <precision P> template <qualifier P>
struct compute_rand<2, uint8, P> struct compute_rand<2, uint8, P>
{ {
GLM_FUNC_QUALIFIER static vec<2, uint8, P> call() GLM_FUNC_QUALIFIER static vec<2, uint8, P> call()
@ -39,7 +39,7 @@ namespace detail
} }
}; };
template <precision P> template <qualifier P>
struct compute_rand<3, uint8, P> struct compute_rand<3, uint8, P>
{ {
GLM_FUNC_QUALIFIER static vec<3, uint8, P> call() GLM_FUNC_QUALIFIER static vec<3, uint8, P> call()
@ -51,7 +51,7 @@ namespace detail
} }
}; };
template <precision P> template <qualifier P>
struct compute_rand<4, uint8, P> struct compute_rand<4, uint8, P>
{ {
GLM_FUNC_QUALIFIER static vec<4, uint8, P> call() GLM_FUNC_QUALIFIER static vec<4, uint8, P> call()
@ -64,7 +64,7 @@ namespace detail
} }
}; };
template <length_t L, precision P> template <length_t L, qualifier P>
struct compute_rand<L, uint16, P> struct compute_rand<L, uint16, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint16, P> call() GLM_FUNC_QUALIFIER static vec<L, uint16, P> call()
@ -75,7 +75,7 @@ namespace detail
} }
}; };
template <length_t L, precision P> template <length_t L, qualifier P>
struct compute_rand<L, uint32, P> struct compute_rand<L, uint32, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint32, P> call() GLM_FUNC_QUALIFIER static vec<L, uint32, P> call()
@ -86,7 +86,7 @@ namespace detail
} }
}; };
template <length_t L, precision P> template <length_t L, qualifier P>
struct compute_rand<L, uint64, P> struct compute_rand<L, uint64, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint64, P> call() GLM_FUNC_QUALIFIER static vec<L, uint64, P> call()
@ -97,13 +97,13 @@ namespace detail
} }
}; };
template <length_t L, typename T, precision P> template <length_t L, typename T, qualifier P>
struct compute_linearRand struct compute_linearRand
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& Min, vec<L, T, P> const& Max); GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& Min, vec<L, T, P> const& Max);
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, int8, P> struct compute_linearRand<L, int8, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, int8, P> call(vec<L, int8, P> const& Min, vec<L, int8, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, int8, P> call(vec<L, int8, P> const& Min, vec<L, int8, P> const& Max)
@ -112,7 +112,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, uint8, P> struct compute_linearRand<L, uint8, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint8, P> call(vec<L, uint8, P> const& Min, vec<L, uint8, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, uint8, P> call(vec<L, uint8, P> const& Min, vec<L, uint8, P> const& Max)
@ -121,7 +121,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, int16, P> struct compute_linearRand<L, int16, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, int16, P> call(vec<L, int16, P> const& Min, vec<L, int16, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, int16, P> call(vec<L, int16, P> const& Min, vec<L, int16, P> const& Max)
@ -130,7 +130,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, uint16, P> struct compute_linearRand<L, uint16, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint16, P> call(vec<L, uint16, P> const& Min, vec<L, uint16, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, uint16, P> call(vec<L, uint16, P> const& Min, vec<L, uint16, P> const& Max)
@ -139,7 +139,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, int32, P> struct compute_linearRand<L, int32, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, int32, P> call(vec<L, int32, P> const & Min, vec<L, int32, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, int32, P> call(vec<L, int32, P> const & Min, vec<L, int32, P> const& Max)
@ -148,7 +148,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, uint32, P> struct compute_linearRand<L, uint32, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint32, P> call(vec<L, uint32, P> const& Min, vec<L, uint32, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, uint32, P> call(vec<L, uint32, P> const& Min, vec<L, uint32, P> const& Max)
@ -157,7 +157,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, int64, P> struct compute_linearRand<L, int64, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, int64, P> call(vec<L, int64, P> const& Min, vec<L, int64, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, int64, P> call(vec<L, int64, P> const& Min, vec<L, int64, P> const& Max)
@ -166,7 +166,7 @@ namespace detail
} }
}; };
template<length_t L, precision P> template<length_t L, qualifier P>
struct compute_linearRand<L, uint64, P> struct compute_linearRand<L, uint64, P>
{ {
GLM_FUNC_QUALIFIER static vec<L, uint64, P> call(vec<L, uint64, P> const& Min, vec<L, uint64, P> const& Max) GLM_FUNC_QUALIFIER static vec<L, uint64, P> call(vec<L, uint64, P> const& Min, vec<L, uint64, P> const& Max)
@ -265,7 +265,7 @@ namespace detail
vec<1, genType, highp>(Max)).x; vec<1, genType, highp>(Max)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> linearRand(vec<L, T, P> const & Min, vec<L, T, P> const& Max) GLM_FUNC_QUALIFIER vec<L, T, P> linearRand(vec<L, T, P> const & Min, vec<L, T, P> const& Max)
{ {
return detail::compute_linearRand<L, T, P>::call(Min, Max); return detail::compute_linearRand<L, T, P>::call(Min, Max);
@ -287,7 +287,7 @@ namespace detail
return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean; return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> gaussRand(vec<L, T, P> const& Mean, vec<L, T, P> const& Deviation) GLM_FUNC_QUALIFIER vec<L, T, P> gaussRand(vec<L, T, P> const& Mean, vec<L, T, P> const& Deviation)
{ {
return detail::functor2<L, T, P>::call(gaussRand, Mean, Deviation); return detail::functor2<L, T, P>::call(gaussRand, Mean, Deviation);

View File

@ -14,8 +14,8 @@ namespace glm
return genType(1) / glm::cos(angle); return genType(1) / glm::cos(angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> sec(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> sec(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sec' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sec' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(sec, x); return detail::functor1<L, T, T, P>::call(sec, x);
@ -29,8 +29,8 @@ namespace glm
return genType(1) / glm::sin(angle); return genType(1) / glm::sin(angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> csc(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> csc(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csc' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csc' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(csc, x); return detail::functor1<L, T, T, P>::call(csc, x);
@ -46,8 +46,8 @@ namespace glm
return glm::tan(pi_over_2 - angle); return glm::tan(pi_over_2 - angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> cot(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> cot(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cot' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cot' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(cot, x); return detail::functor1<L, T, T, P>::call(cot, x);
@ -61,8 +61,8 @@ namespace glm
return acos(genType(1) / x); return acos(genType(1) / x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> asec(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> asec(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asec' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asec' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(asec, x); return detail::functor1<L, T, T, P>::call(asec, x);
@ -76,8 +76,8 @@ namespace glm
return asin(genType(1) / x); return asin(genType(1) / x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> acsc(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> acsc(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsc' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsc' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(acsc, x); return detail::functor1<L, T, T, P>::call(acsc, x);
@ -93,8 +93,8 @@ namespace glm
return pi_over_2 - atan(x); return pi_over_2 - atan(x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> acot(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> acot(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acot' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acot' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(acot, x); return detail::functor1<L, T, T, P>::call(acot, x);
@ -108,8 +108,8 @@ namespace glm
return genType(1) / glm::cosh(angle); return genType(1) / glm::cosh(angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> sech(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> sech(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sech' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sech' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(sech, x); return detail::functor1<L, T, T, P>::call(sech, x);
@ -123,8 +123,8 @@ namespace glm
return genType(1) / glm::sinh(angle); return genType(1) / glm::sinh(angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> csch(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> csch(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csch' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'csch' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(csch, x); return detail::functor1<L, T, T, P>::call(csch, x);
@ -138,8 +138,8 @@ namespace glm
return glm::cosh(angle) / glm::sinh(angle); return glm::cosh(angle) / glm::sinh(angle);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> coth(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> coth(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'coth' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'coth' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(coth, x); return detail::functor1<L, T, T, P>::call(coth, x);
@ -153,8 +153,8 @@ namespace glm
return acosh(genType(1) / x); return acosh(genType(1) / x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> asech(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> asech(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asech' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'asech' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(asech, x); return detail::functor1<L, T, T, P>::call(asech, x);
@ -168,8 +168,8 @@ namespace glm
return acsch(genType(1) / x); return acsch(genType(1) / x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> acsch(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> acsch(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsch' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acsch' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(acsch, x); return detail::functor1<L, T, T, P>::call(acsch, x);
@ -183,8 +183,8 @@ namespace glm
return atanh(genType(1) / x); return atanh(genType(1) / x);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> acoth(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> acoth(vec<L, T, P> const & x)
{ {
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acoth' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'acoth' only accept floating-point inputs");
return detail::functor1<L, T, T, P>::call(acoth, x); return detail::functor1<L, T, T, P>::call(acoth, x);

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/_vectorize.hpp" #include "../detail/_vectorize.hpp"
#include "../vector_relational.hpp" #include "../vector_relational.hpp"
#include "../common.hpp" #include "../common.hpp"
@ -39,7 +39,7 @@ namespace glm
/// Return true if the value is a power of two number. /// Return true if the value is a power of two number.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> isPowerOfTwo(vec<L, T, P> const& value); GLM_FUNC_DECL vec<L, bool, P> isPowerOfTwo(vec<L, T, P> const& value);
/// Return the power of two number which value is just higher the input value, /// Return the power of two number which value is just higher the input value,
@ -53,7 +53,7 @@ namespace glm
/// round up to a power of two. /// round up to a power of two.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> ceilPowerOfTwo(vec<L, T, P> const& value); GLM_FUNC_DECL vec<L, T, P> ceilPowerOfTwo(vec<L, T, P> const& value);
/// Return the power of two number which value is just lower the input value, /// Return the power of two number which value is just lower the input value,
@ -67,7 +67,7 @@ namespace glm
/// round down to a power of two. /// round down to a power of two.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> floorPowerOfTwo(vec<L, T, P> const& value); GLM_FUNC_DECL vec<L, T, P> floorPowerOfTwo(vec<L, T, P> const& value);
/// Return the power of two number which value is the closet to the input value. /// Return the power of two number which value is the closet to the input value.
@ -79,7 +79,7 @@ namespace glm
/// Return the power of two number which value is the closet to the input value. /// Return the power of two number which value is the closet to the input value.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> roundPowerOfTwo(vec<L, T, P> const& value); GLM_FUNC_DECL vec<L, T, P> roundPowerOfTwo(vec<L, T, P> const& value);
/// Return true if the 'Value' is a multiple of 'Multiple'. /// Return true if the 'Value' is a multiple of 'Multiple'.
@ -91,13 +91,13 @@ namespace glm
/// Return true if the 'Value' is a multiple of 'Multiple'. /// Return true if the 'Value' is a multiple of 'Multiple'.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, T Multiple); GLM_FUNC_DECL vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, T Multiple);
/// Return true if the 'Value' is a multiple of 'Multiple'. /// Return true if the 'Value' is a multiple of 'Multiple'.
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, vec<L, T, P> const& Multiple); GLM_FUNC_DECL vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, vec<L, T, P> const& Multiple);
/// Higher multiple number of Source. /// Higher multiple number of Source.
@ -115,7 +115,7 @@ namespace glm
/// @param Multiple Must be a null or positive value /// @param Multiple Must be a null or positive value
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> ceilMultiple(vec<L, T, P> const & Source, vec<L, T, P> const& Multiple); GLM_FUNC_DECL vec<L, T, P> ceilMultiple(vec<L, T, P> const & Source, vec<L, T, P> const& Multiple);
/// Lower multiple number of Source. /// Lower multiple number of Source.
@ -133,7 +133,7 @@ namespace glm
/// @param Multiple Must be a null or positive value /// @param Multiple Must be a null or positive value
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> floorMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple); GLM_FUNC_DECL vec<L, T, P> floorMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple);
/// Lower multiple number of Source. /// Lower multiple number of Source.
@ -151,7 +151,7 @@ namespace glm
/// @param Multiple Must be a null or positive value /// @param Multiple Must be a null or positive value
/// ///
/// @see gtc_round /// @see gtc_round
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vec<L, T, P> roundMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple); GLM_FUNC_DECL vec<L, T, P> roundMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple);
/// @} /// @}

View File

@ -6,7 +6,7 @@
namespace glm{ namespace glm{
namespace detail namespace detail
{ {
template<length_t L, typename T, precision P, bool compute = false> template<length_t L, typename T, qualifier P, bool compute = false>
struct compute_ceilShift struct compute_ceilShift
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T)
@ -15,7 +15,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct compute_ceilShift<L, T, P, true> struct compute_ceilShift<L, T, P, true>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Shift) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& v, T Shift)
@ -24,7 +24,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P, bool isSigned = true> template<length_t L, typename T, qualifier P, bool isSigned = true>
struct compute_ceilPowerOfTwo struct compute_ceilPowerOfTwo
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -46,7 +46,7 @@ namespace detail
} }
}; };
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
struct compute_ceilPowerOfTwo<L, T, P, false> struct compute_ceilPowerOfTwo<L, T, P, false>
{ {
GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x) GLM_FUNC_QUALIFIER static vec<L, T, P> call(vec<L, T, P> const& x)
@ -219,7 +219,7 @@ namespace detail
return !(Result & (Result - 1)); return !(Result & (Result - 1));
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> isPowerOfTwo(vec<L, T, P> const & Value) GLM_FUNC_QUALIFIER vec<L, bool, P> isPowerOfTwo(vec<L, T, P> const & Value)
{ {
vec<L, T, P> const Result(abs(Value)); vec<L, T, P> const Result(abs(Value));
@ -235,7 +235,7 @@ namespace detail
return detail::compute_ceilPowerOfTwo<1, genType, defaultp, std::numeric_limits<genType>::is_signed>::call(vec<1, genType, defaultp>(value)).x; return detail::compute_ceilPowerOfTwo<1, genType, defaultp, std::numeric_limits<genType>::is_signed>::call(vec<1, genType, defaultp>(value)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> ceilPowerOfTwo(vec<L, T, P> const& v) GLM_FUNC_QUALIFIER vec<L, T, P> ceilPowerOfTwo(vec<L, T, P> const& v)
{ {
return detail::compute_ceilPowerOfTwo<L, T, P, std::numeric_limits<T>::is_signed>::call(v); return detail::compute_ceilPowerOfTwo<L, T, P, std::numeric_limits<T>::is_signed>::call(v);
@ -250,7 +250,7 @@ namespace detail
return isPowerOfTwo(value) ? value : static_cast<genType>(1) << findMSB(value); return isPowerOfTwo(value) ? value : static_cast<genType>(1) << findMSB(value);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> floorPowerOfTwo(vec<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> floorPowerOfTwo(vec<L, T, P> const & v)
{ {
return detail::functor1<L, T, T, P>::call(floorPowerOfTwo, v); return detail::functor1<L, T, T, P>::call(floorPowerOfTwo, v);
@ -270,7 +270,7 @@ namespace detail
return (next - value) < (value - prev) ? next : prev; return (next - value) < (value - prev) ? next : prev;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> roundPowerOfTwo(vec<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> roundPowerOfTwo(vec<L, T, P> const & v)
{ {
return detail::functor1<L, T, T, P>::call(roundPowerOfTwo, v); return detail::functor1<L, T, T, P>::call(roundPowerOfTwo, v);
@ -285,13 +285,13 @@ namespace detail
return isMultiple(vec<1, genType>(Value), vec<1, genType>(Multiple)).x; return isMultiple(vec<1, genType>(Value), vec<1, genType>(Multiple)).x;
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> isMultiple(vec<L, T, P> const & Value, T Multiple) GLM_FUNC_QUALIFIER vec<L, bool, P> isMultiple(vec<L, T, P> const & Value, T Multiple)
{ {
return (Value % Multiple) == vec<L, T, P>(0); return (Value % Multiple) == vec<L, T, P>(0);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, vec<L, T, P> const& Multiple) GLM_FUNC_QUALIFIER vec<L, bool, P> isMultiple(vec<L, T, P> const& Value, vec<L, T, P> const& Multiple)
{ {
return (Value % Multiple) == vec<L, T, P>(0); return (Value % Multiple) == vec<L, T, P>(0);
@ -306,7 +306,7 @@ namespace detail
return detail::compute_ceilMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple); return detail::compute_ceilMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> ceilMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple) GLM_FUNC_QUALIFIER vec<L, T, P> ceilMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple)
{ {
return detail::functor2<L, T, P>::call(ceilMultiple, Source, Multiple); return detail::functor2<L, T, P>::call(ceilMultiple, Source, Multiple);
@ -321,7 +321,7 @@ namespace detail
return detail::compute_floorMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple); return detail::compute_floorMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> floorMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple) GLM_FUNC_QUALIFIER vec<L, T, P> floorMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple)
{ {
return detail::functor2<L, T, P>::call(floorMultiple, Source, Multiple); return detail::functor2<L, T, P>::call(floorMultiple, Source, Multiple);
@ -336,7 +336,7 @@ namespace detail
return detail::compute_roundMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple); return detail::compute_roundMultiple<std::numeric_limits<genType>::is_iec559, std::numeric_limits<genType>::is_signed>::call(Source, Multiple);
} }
template<length_t L, typename T, precision P> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<L, T, P> roundMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple) GLM_FUNC_QUALIFIER vec<L, T, P> roundMultiple(vec<L, T, P> const& Source, vec<L, T, P> const& Multiple)
{ {
return detail::functor2<L, T, P>::call(roundMultiple, Source, Multiple); return detail::functor2<L, T, P>::call(roundMultiple, Source, Multiple);

View File

@ -64,170 +64,170 @@ namespace glm
// -- *vec2 -- // -- *vec2 --
/// 2 components vector of high single-precision floating-point numbers. /// 2 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, float, aligned_highp> aligned_highp_vec2; typedef vec<2, float, aligned_highp> aligned_highp_vec2;
/// 2 components vector of medium single-precision floating-point numbers. /// 2 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, float, aligned_mediump> aligned_mediump_vec2; typedef vec<2, float, aligned_mediump> aligned_mediump_vec2;
/// 2 components vector of low single-precision floating-point numbers. /// 2 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, float, aligned_lowp> aligned_lowp_vec2; typedef vec<2, float, aligned_lowp> aligned_lowp_vec2;
/// 2 components vector of high double-precision floating-point numbers. /// 2 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, double, aligned_highp> aligned_highp_dvec2; typedef vec<2, double, aligned_highp> aligned_highp_dvec2;
/// 2 components vector of medium double-precision floating-point numbers. /// 2 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, double, aligned_mediump> aligned_mediump_dvec2; typedef vec<2, double, aligned_mediump> aligned_mediump_dvec2;
/// 2 components vector of low double-precision floating-point numbers. /// 2 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, double, aligned_lowp> aligned_lowp_dvec2; typedef vec<2, double, aligned_lowp> aligned_lowp_dvec2;
/// 2 components vector of high precision signed integer numbers. /// 2 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, int, aligned_highp> aligned_highp_ivec2; typedef vec<2, int, aligned_highp> aligned_highp_ivec2;
/// 2 components vector of medium precision signed integer numbers. /// 2 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2; typedef vec<2, int, aligned_mediump> aligned_mediump_ivec2;
/// 2 components vector of low precision signed integer numbers. /// 2 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2; typedef vec<2, int, aligned_lowp> aligned_lowp_ivec2;
/// 2 components vector of high precision unsigned integer numbers. /// 2 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, uint, aligned_highp> aligned_highp_uvec2; typedef vec<2, uint, aligned_highp> aligned_highp_uvec2;
/// 2 components vector of medium precision unsigned integer numbers. /// 2 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2; typedef vec<2, uint, aligned_mediump> aligned_mediump_uvec2;
/// 2 components vector of low precision unsigned integer numbers. /// 2 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2; typedef vec<2, uint, aligned_lowp> aligned_lowp_uvec2;
/// 2 components vector of high precision bool numbers. /// 2 components vector of high qualifier bool numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, bool, aligned_highp> aligned_highp_bvec2; typedef vec<2, bool, aligned_highp> aligned_highp_bvec2;
/// 2 components vector of medium precision bool numbers. /// 2 components vector of medium qualifier bool numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, bool, aligned_mediump> aligned_mediump_bvec2; typedef vec<2, bool, aligned_mediump> aligned_mediump_bvec2;
/// 2 components vector of low precision bool numbers. /// 2 components vector of low qualifier bool numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<2, bool, aligned_lowp> aligned_lowp_bvec2; typedef vec<2, bool, aligned_lowp> aligned_lowp_bvec2;
// -- *vec3 -- // -- *vec3 --
/// 3 components vector of high single-precision floating-point numbers. /// 3 components vector of high single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, float, aligned_highp> aligned_highp_vec3; typedef vec<3, float, aligned_highp> aligned_highp_vec3;
/// 3 components vector of medium single-precision floating-point numbers. /// 3 components vector of medium single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, float, aligned_mediump> aligned_mediump_vec3; typedef vec<3, float, aligned_mediump> aligned_mediump_vec3;
/// 3 components vector of low single-precision floating-point numbers. /// 3 components vector of low single-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, float, aligned_lowp> aligned_lowp_vec3; typedef vec<3, float, aligned_lowp> aligned_lowp_vec3;
/// 3 components vector of high double-precision floating-point numbers. /// 3 components vector of high double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, double, aligned_highp> aligned_highp_dvec3; typedef vec<3, double, aligned_highp> aligned_highp_dvec3;
/// 3 components vector of medium double-precision floating-point numbers. /// 3 components vector of medium double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3; typedef vec<3, double, aligned_mediump> aligned_mediump_dvec3;
/// 3 components vector of low double-precision floating-point numbers. /// 3 components vector of low double-qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3; typedef vec<3, double, aligned_lowp> aligned_lowp_dvec3;
/// 3 components vector of high precision signed integer numbers. /// 3 components vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, int, aligned_highp> aligned_highp_ivec3; typedef vec<3, int, aligned_highp> aligned_highp_ivec3;
/// 3 components vector of medium precision signed integer numbers. /// 3 components vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3; typedef vec<3, int, aligned_mediump> aligned_mediump_ivec3;
/// 3 components vector of low precision signed integer numbers. /// 3 components vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3; typedef vec<3, int, aligned_lowp> aligned_lowp_ivec3;
/// 3 components vector of high precision unsigned integer numbers. /// 3 components vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, uint, aligned_highp> aligned_highp_uvec3; typedef vec<3, uint, aligned_highp> aligned_highp_uvec3;
/// 3 components vector of medium precision unsigned integer numbers. /// 3 components vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3; typedef vec<3, uint, aligned_mediump> aligned_mediump_uvec3;
/// 3 components vector of low precision unsigned integer numbers. /// 3 components vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3; typedef vec<3, uint, aligned_lowp> aligned_lowp_uvec3;
/// 3 components vector of high precision bool numbers. /// 3 components vector of high qualifier bool numbers.
typedef vec<3, bool, aligned_highp> aligned_highp_bvec3; typedef vec<3, bool, aligned_highp> aligned_highp_bvec3;
/// 3 components vector of medium precision bool numbers. /// 3 components vector of medium qualifier bool numbers.
typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3; typedef vec<3, bool, aligned_mediump> aligned_mediump_bvec3;
/// 3 components vector of low precision bool numbers. /// 3 components vector of low qualifier bool numbers.
typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3; typedef vec<3, bool, aligned_lowp> aligned_lowp_bvec3;
// -- *vec4 -- // -- *vec4 --
/// 4 components vector of high single-precision floating-point numbers. /// 4 components vector of high single-qualifier floating-point numbers.
typedef vec<4, float, aligned_highp> aligned_highp_vec4; typedef vec<4, float, aligned_highp> aligned_highp_vec4;
/// 4 components vector of medium single-precision floating-point numbers. /// 4 components vector of medium single-qualifier floating-point numbers.
typedef vec<4, float, aligned_mediump> aligned_mediump_vec4; typedef vec<4, float, aligned_mediump> aligned_mediump_vec4;
/// 4 components vector of low single-precision floating-point numbers. /// 4 components vector of low single-qualifier floating-point numbers.
typedef vec<4, float, aligned_lowp> aligned_lowp_vec4; typedef vec<4, float, aligned_lowp> aligned_lowp_vec4;
/// 4 components vector of high double-precision floating-point numbers. /// 4 components vector of high double-qualifier floating-point numbers.
typedef vec<4, double, aligned_highp> aligned_highp_dvec4; typedef vec<4, double, aligned_highp> aligned_highp_dvec4;
/// 4 components vector of medium double-precision floating-point numbers. /// 4 components vector of medium double-qualifier floating-point numbers.
typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4; typedef vec<4, double, aligned_mediump> aligned_mediump_dvec4;
/// 4 components vector of low double-precision floating-point numbers. /// 4 components vector of low double-qualifier floating-point numbers.
typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4; typedef vec<4, double, aligned_lowp> aligned_lowp_dvec4;
/// 4 components vector of high precision signed integer numbers. /// 4 components vector of high qualifier signed integer numbers.
typedef vec<4, int, aligned_highp> aligned_highp_ivec4; typedef vec<4, int, aligned_highp> aligned_highp_ivec4;
/// 4 components vector of medium precision signed integer numbers. /// 4 components vector of medium qualifier signed integer numbers.
typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4; typedef vec<4, int, aligned_mediump> aligned_mediump_ivec4;
/// 4 components vector of low precision signed integer numbers. /// 4 components vector of low qualifier signed integer numbers.
typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4; typedef vec<4, int, aligned_lowp> aligned_lowp_ivec4;
/// 4 components vector of high precision unsigned integer numbers. /// 4 components vector of high qualifier unsigned integer numbers.
typedef vec<4, uint, aligned_highp> aligned_highp_uvec4; typedef vec<4, uint, aligned_highp> aligned_highp_uvec4;
/// 4 components vector of medium precision unsigned integer numbers. /// 4 components vector of medium qualifier unsigned integer numbers.
typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4; typedef vec<4, uint, aligned_mediump> aligned_mediump_uvec4;
/// 4 components vector of low precision unsigned integer numbers. /// 4 components vector of low qualifier unsigned integer numbers.
typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4; typedef vec<4, uint, aligned_lowp> aligned_lowp_uvec4;
/// 4 components vector of high precision bool numbers. /// 4 components vector of high qualifier bool numbers.
typedef vec<4, bool, aligned_highp> aligned_highp_bvec4; typedef vec<4, bool, aligned_highp> aligned_highp_bvec4;
/// 4 components vector of medium precision bool numbers. /// 4 components vector of medium qualifier bool numbers.
typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4; typedef vec<4, bool, aligned_mediump> aligned_mediump_bvec4;
/// 4 components vector of low precision bool numbers. /// 4 components vector of low qualifier bool numbers.
typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4; typedef vec<4, bool, aligned_lowp> aligned_lowp_bvec4;
// -- default -- // -- default --
@ -267,16 +267,16 @@ namespace glm
typedef aligned_mediump_dvec3 aligned_dvec3; typedef aligned_mediump_dvec3 aligned_dvec3;
typedef aligned_mediump_dvec4 aligned_dvec4; typedef aligned_mediump_dvec4 aligned_dvec4;
#else //defined(GLM_PRECISION_HIGHP_DOUBLE) #else //defined(GLM_PRECISION_HIGHP_DOUBLE)
/// 1 component vector of double-precision floating-point numbers. /// 1 component vector of double-qualifier floating-point numbers.
typedef aligned_highp_dvec1 aligned_dvec1; typedef aligned_highp_dvec1 aligned_dvec1;
/// 2 components vector of double-precision floating-point numbers. /// 2 components vector of double-qualifier floating-point numbers.
typedef aligned_highp_dvec2 aligned_dvec2; typedef aligned_highp_dvec2 aligned_dvec2;
/// 3 components vector of double-precision floating-point numbers. /// 3 components vector of double-qualifier floating-point numbers.
typedef aligned_highp_dvec3 aligned_dvec3; typedef aligned_highp_dvec3 aligned_dvec3;
/// 4 components vector of double-precision floating-point numbers. /// 4 components vector of double-qualifier floating-point numbers.
typedef aligned_highp_dvec4 aligned_dvec4; typedef aligned_highp_dvec4 aligned_dvec4;
#endif//GLM_PRECISION #endif//GLM_PRECISION

View File

@ -7,9 +7,9 @@
/// @defgroup gtc_type_precision GLM_GTC_type_precision /// @defgroup gtc_type_precision GLM_GTC_type_precision
/// @ingroup gtc /// @ingroup gtc
/// ///
/// @brief Defines specific C++-based precision types. /// @brief Defines specific C++-based qualifier types.
/// ///
/// @ref core_precision defines types based on GLSL's precision 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.
/// ///
/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities. /// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.
@ -44,123 +44,123 @@ namespace glm
/// @addtogroup gtc_type_precision /// @addtogroup gtc_type_precision
/// @{ /// @{
/// Low precision 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 precision 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;
/// Low precision 32 bit signed integer type. /// Low qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 lowp_int32; typedef detail::int32 lowp_int32;
/// Low precision 64 bit signed integer type. /// Low qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 lowp_int64; typedef detail::int64 lowp_int64;
/// Low precision 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 precision 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;
/// Low precision 32 bit signed integer type. /// Low qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 lowp_int32_t; typedef detail::int32 lowp_int32_t;
/// Low precision 64 bit signed integer type. /// Low qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 lowp_int64_t; typedef detail::int64 lowp_int64_t;
/// Low precision 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 precision 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;
/// Low precision 32 bit signed integer type. /// Low qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 lowp_i32; typedef detail::int32 lowp_i32;
/// Low precision 64 bit signed integer type. /// Low qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 lowp_i64; typedef detail::int64 lowp_i64;
/// Medium precision 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 precision 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;
/// Medium precision 32 bit signed integer type. /// Medium qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 mediump_int32; typedef detail::int32 mediump_int32;
/// Medium precision 64 bit signed integer type. /// Medium qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 mediump_int64; typedef detail::int64 mediump_int64;
/// Medium precision 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 precision 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;
/// Medium precision 32 bit signed integer type. /// Medium qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 mediump_int32_t; typedef detail::int32 mediump_int32_t;
/// Medium precision 64 bit signed integer type. /// Medium qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 mediump_int64_t; typedef detail::int64 mediump_int64_t;
/// Medium precision 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 precision 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;
/// Medium precision 32 bit signed integer type. /// Medium qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 mediump_i32; typedef detail::int32 mediump_i32;
/// Medium precision 64 bit signed integer type. /// Medium qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 mediump_i64; typedef detail::int64 mediump_i64;
/// High precision 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 precision 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;
/// High precision 32 bit signed integer type. /// High qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 highp_int32; typedef detail::int32 highp_int32;
/// High precision 64 bit signed integer type. /// High qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 highp_int64; typedef detail::int64 highp_int64;
/// High precision 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 precision 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;
@ -168,23 +168,23 @@ namespace glm
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 highp_int32_t; typedef detail::int32 highp_int32_t;
/// High precision 64 bit signed integer type. /// High qualifier 64 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int64 highp_int64_t; typedef detail::int64 highp_int64_t;
/// High precision 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 precision 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;
/// High precision 32 bit signed integer type. /// High qualifier 32 bit signed integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::int32 highp_i32; typedef detail::int32 highp_i32;
/// High precision 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;
@ -316,163 +316,163 @@ namespace glm
///////////////////////////// /////////////////////////////
// Unsigned int vector types // Unsigned int vector types
/// Low precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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 precision 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;
/// High precision 32 bit unsigned integer type. /// High qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 highp_uint32; typedef detail::uint32 highp_uint32;
/// High precision 64 bit unsigned integer type. /// High qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 highp_uint64; typedef detail::uint64 highp_uint64;
/// High precision 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 precision 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;
/// High precision 32 bit unsigned integer type. /// High 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;
/// High precision 64 bit unsigned integer type. /// High 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;
/// High precision 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 precision 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;
/// High precision 32 bit unsigned integer type. /// High qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 highp_u32; typedef detail::uint32 highp_u32;
/// High precision 64 bit unsigned integer type. /// High qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 highp_u64; typedef detail::uint64 highp_u64;
/// Default precision 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 precision 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;
/// Default precision 32 bit unsigned integer type. /// Default qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 uint32; typedef detail::uint32 uint32;
/// Default precision 64 bit unsigned integer type. /// Default qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 uint64; typedef detail::uint64 uint64;
@ -482,105 +482,105 @@ namespace glm
using std::uint32_t; using std::uint32_t;
using std::uint64_t; using std::uint64_t;
#else #else
/// Default precision 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 precision 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;
/// Default precision 32 bit unsigned integer type. /// Default qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 uint32_t; typedef detail::uint32 uint32_t;
/// Default precision 64 bit unsigned integer type. /// Default qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 uint64_t; typedef detail::uint64 uint64_t;
#endif #endif
/// Default precision 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 precision 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;
/// Default precision 32 bit unsigned integer type. /// Default qualifier 32 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint32 u32; typedef detail::uint32 u32;
/// Default precision 64 bit unsigned integer type. /// Default qualifier 64 bit unsigned integer type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::uint64 u64; typedef detail::uint64 u64;
/// Default precision 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 precision 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;
/// Default precision 8 bit unsigned integer vector of 3 components type. /// Default qualifier 8 bit unsigned integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, u8, defaultp> u8vec3; typedef vec<3, u8, defaultp> u8vec3;
/// Default precision 8 bit unsigned integer vector of 4 components type. /// Default qualifier 8 bit unsigned integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, u8, defaultp> u8vec4; typedef vec<4, u8, defaultp> u8vec4;
/// Default precision 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 precision 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;
/// Default precision 16 bit unsigned integer vector of 3 components type. /// Default qualifier 16 bit unsigned integer vector of 3 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, u16, defaultp> u16vec3; typedef vec<3, u16, defaultp> u16vec3;
/// Default precision 16 bit unsigned integer vector of 4 components type. /// Default qualifier 16 bit unsigned integer vector of 4 components type.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, u16, defaultp> u16vec4; typedef vec<4, u16, defaultp> u16vec4;
/// Default precision 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 precision 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;
/// Default precision 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 vec<3, u32, defaultp> u32vec3; typedef vec<3, u32, defaultp> u32vec3;
/// Default precision 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 vec<4, u32, defaultp> u32vec4; typedef vec<4, u32, defaultp> u32vec4;
/// Default precision 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 precision 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;
/// Default precision 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 vec<3, u64, defaultp> u64vec3; typedef vec<3, u64, defaultp> u64vec3;
/// Default precision 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 vec<4, u64, defaultp> u64vec4; typedef vec<4, u64, defaultp> u64vec4;
@ -588,80 +588,80 @@ namespace glm
////////////////////// //////////////////////
// Float vector types // Float vector types
/// 32 bit single-precision floating-point scalar. /// 32 bit single-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float32 float32; typedef detail::float32 float32;
/// 64 bit double-precision floating-point scalar. /// 64 bit double-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float64 float64; typedef detail::float64 float64;
/// 32 bit single-precision floating-point scalar. /// 32 bit single-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float32 float32_t; typedef detail::float32 float32_t;
/// 64 bit double-precision floating-point scalar. /// 64 bit double-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef detail::float64 float64_t; typedef detail::float64 float64_t;
/// 32 bit single-precision floating-point scalar. /// 32 bit single-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef float32 f32; typedef float32 f32;
/// 64 bit double-precision floating-point scalar. /// 64 bit double-qualifier floating-point scalar.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef float64 f64; typedef float64 f64;
/// Single-precision 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, float, defaultp> fvec1; typedef vec<1, float, defaultp> fvec1;
/// Single-precision floating-point vector of 2 components. /// Single-qualifier floating-point vector of 2 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, float, defaultp> fvec2; typedef vec<2, float, defaultp> fvec2;
/// Single-precision floating-point vector of 3 components. /// Single-qualifier floating-point vector of 3 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, float, defaultp> fvec3; typedef vec<3, float, defaultp> fvec3;
/// Single-precision floating-point vector of 4 components. /// Single-qualifier floating-point vector of 4 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, float, defaultp> fvec4; typedef vec<4, float, defaultp> fvec4;
/// Single-precision 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;
/// Single-precision floating-point vector of 2 components. /// Single-qualifier floating-point vector of 2 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, f32, defaultp> f32vec2; typedef vec<2, f32, defaultp> f32vec2;
/// Single-precision floating-point vector of 3 components. /// Single-qualifier floating-point vector of 3 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, f32, defaultp> f32vec3; typedef vec<3, f32, defaultp> f32vec3;
/// Single-precision floating-point vector of 4 components. /// Single-qualifier floating-point vector of 4 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, f32, defaultp> f32vec4; typedef vec<4, f32, defaultp> f32vec4;
/// Double-precision floating-point vector of 1 component. /// Double-qualifier floating-point vector of 1 component.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<1, f64, defaultp> f64vec1; typedef vec<1, f64, defaultp> f64vec1;
/// Double-precision floating-point vector of 2 components. /// Double-qualifier floating-point vector of 2 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<2, f64, defaultp> f64vec2; typedef vec<2, f64, defaultp> f64vec2;
/// Double-precision floating-point vector of 3 components. /// Double-qualifier floating-point vector of 3 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<3, f64, defaultp> f64vec3; typedef vec<3, f64, defaultp> f64vec3;
/// Double-precision floating-point vector of 4 components. /// Double-qualifier floating-point vector of 4 components.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef vec<4, f64, defaultp> f64vec4; typedef vec<4, f64, defaultp> f64vec4;
@ -669,176 +669,176 @@ namespace glm
////////////////////// //////////////////////
// Float matrix types // Float matrix types
/// Single-precision floating-point 1x1 matrix. /// Single-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef detail::tmat1x1<f32> fmat1; //typedef detail::tmat1x1<f32> fmat1;
/// Single-precision floating-point 2x2 matrix. /// Single-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f32, defaultp> fmat2; typedef mat<2, 2, f32, defaultp> fmat2;
/// Single-precision floating-point 3x3 matrix. /// Single-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f32, defaultp> fmat3; typedef mat<3, 3, f32, defaultp> fmat3;
/// Single-precision floating-point 4x4 matrix. /// Single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f32, defaultp> fmat4; typedef mat<4, 4, f32, defaultp> fmat4;
/// Single-precision floating-point 1x1 matrix. /// Single-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef f32 fmat1x1; //typedef f32 fmat1x1;
/// Single-precision floating-point 2x2 matrix. /// Single-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f32, defaultp> fmat2x2; typedef mat<2, 2, f32, defaultp> fmat2x2;
/// Single-precision floating-point 2x3 matrix. /// Single-qualifier floating-point 2x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 3, f32, defaultp> fmat2x3; typedef mat<2, 3, f32, defaultp> fmat2x3;
/// Single-precision floating-point 2x4 matrix. /// Single-qualifier floating-point 2x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 4, f32, defaultp> fmat2x4; typedef mat<2, 4, f32, defaultp> fmat2x4;
/// Single-precision floating-point 3x2 matrix. /// Single-qualifier floating-point 3x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 2, f32, defaultp> fmat3x2; typedef mat<3, 2, f32, defaultp> fmat3x2;
/// Single-precision floating-point 3x3 matrix. /// Single-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f32, defaultp> fmat3x3; typedef mat<3, 3, f32, defaultp> fmat3x3;
/// Single-precision floating-point 3x4 matrix. /// Single-qualifier floating-point 3x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 4, f32, defaultp> fmat3x4; typedef mat<3, 4, f32, defaultp> fmat3x4;
/// Single-precision floating-point 4x2 matrix. /// Single-qualifier floating-point 4x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 2, f32, defaultp> fmat4x2; typedef mat<4, 2, f32, defaultp> fmat4x2;
/// Single-precision floating-point 4x3 matrix. /// Single-qualifier floating-point 4x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 3, f32, defaultp> fmat4x3; typedef mat<4, 3, f32, defaultp> fmat4x3;
/// Single-precision floating-point 4x4 matrix. /// Single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f32, defaultp> fmat4x4; typedef mat<4, 4, f32, defaultp> fmat4x4;
/// Single-precision floating-point 1x1 matrix. /// Single-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef detail::tmat1x1<f32, defaultp> f32mat1; //typedef detail::tmat1x1<f32, defaultp> f32mat1;
/// Single-precision floating-point 2x2 matrix. /// Single-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f32, defaultp> f32mat2; typedef mat<2, 2, f32, defaultp> f32mat2;
/// Single-precision floating-point 3x3 matrix. /// Single-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f32, defaultp> f32mat3; typedef mat<3, 3, f32, defaultp> f32mat3;
/// Single-precision floating-point 4x4 matrix. /// Single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f32, defaultp> f32mat4; typedef mat<4, 4, f32, defaultp> f32mat4;
/// Single-precision floating-point 1x1 matrix. /// Single-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef f32 f32mat1x1; //typedef f32 f32mat1x1;
/// Single-precision floating-point 2x2 matrix. /// Single-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f32, defaultp> f32mat2x2; typedef mat<2, 2, f32, defaultp> f32mat2x2;
/// Single-precision floating-point 2x3 matrix. /// Single-qualifier floating-point 2x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 3, f32, defaultp> f32mat2x3; typedef mat<2, 3, f32, defaultp> f32mat2x3;
/// Single-precision floating-point 2x4 matrix. /// Single-qualifier floating-point 2x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 4, f32, defaultp> f32mat2x4; typedef mat<2, 4, f32, defaultp> f32mat2x4;
/// Single-precision floating-point 3x2 matrix. /// Single-qualifier floating-point 3x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 2, f32, defaultp> f32mat3x2; typedef mat<3, 2, f32, defaultp> f32mat3x2;
/// Single-precision floating-point 3x3 matrix. /// Single-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f32, defaultp> f32mat3x3; typedef mat<3, 3, f32, defaultp> f32mat3x3;
/// Single-precision floating-point 3x4 matrix. /// Single-qualifier floating-point 3x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 4, f32, defaultp> f32mat3x4; typedef mat<3, 4, f32, defaultp> f32mat3x4;
/// Single-precision floating-point 4x2 matrix. /// Single-qualifier floating-point 4x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 2, f32, defaultp> f32mat4x2; typedef mat<4, 2, f32, defaultp> f32mat4x2;
/// Single-precision floating-point 4x3 matrix. /// Single-qualifier floating-point 4x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 3, f32, defaultp> f32mat4x3; typedef mat<4, 3, f32, defaultp> f32mat4x3;
/// Single-precision floating-point 4x4 matrix. /// Single-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f32, defaultp> f32mat4x4; typedef mat<4, 4, f32, defaultp> f32mat4x4;
/// Double-precision floating-point 1x1 matrix. /// Double-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef detail::tmat1x1<f64, defaultp> f64mat1; //typedef detail::tmat1x1<f64, defaultp> f64mat1;
/// Double-precision floating-point 2x2 matrix. /// Double-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f64, defaultp> f64mat2; typedef mat<2, 2, f64, defaultp> f64mat2;
/// Double-precision floating-point 3x3 matrix. /// Double-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f64, defaultp> f64mat3; typedef mat<3, 3, f64, defaultp> f64mat3;
/// Double-precision floating-point 4x4 matrix. /// Double-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f64, defaultp> f64mat4; typedef mat<4, 4, f64, defaultp> f64mat4;
/// Double-precision floating-point 1x1 matrix. /// Double-qualifier floating-point 1x1 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
//typedef f64 f64mat1x1; //typedef f64 f64mat1x1;
/// Double-precision floating-point 2x2 matrix. /// Double-qualifier floating-point 2x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 2, f64, defaultp> f64mat2x2; typedef mat<2, 2, f64, defaultp> f64mat2x2;
/// Double-precision floating-point 2x3 matrix. /// Double-qualifier floating-point 2x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 3, f64, defaultp> f64mat2x3; typedef mat<2, 3, f64, defaultp> f64mat2x3;
/// Double-precision floating-point 2x4 matrix. /// Double-qualifier floating-point 2x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<2, 4, f64, defaultp> f64mat2x4; typedef mat<2, 4, f64, defaultp> f64mat2x4;
/// Double-precision floating-point 3x2 matrix. /// Double-qualifier floating-point 3x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 2, f64, defaultp> f64mat3x2; typedef mat<3, 2, f64, defaultp> f64mat3x2;
/// Double-precision floating-point 3x3 matrix. /// Double-qualifier floating-point 3x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 3, f64, defaultp> f64mat3x3; typedef mat<3, 3, f64, defaultp> f64mat3x3;
/// Double-precision floating-point 3x4 matrix. /// Double-qualifier floating-point 3x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<3, 4, f64, defaultp> f64mat3x4; typedef mat<3, 4, f64, defaultp> f64mat3x4;
/// Double-precision floating-point 4x2 matrix. /// Double-qualifier floating-point 4x2 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 2, f64, defaultp> f64mat4x2; typedef mat<4, 2, f64, defaultp> f64mat4x2;
/// Double-precision floating-point 4x3 matrix. /// Double-qualifier floating-point 4x3 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 3, f64, defaultp> f64mat4x3; typedef mat<4, 3, f64, defaultp> f64mat4x3;
/// Double-precision floating-point 4x4 matrix. /// Double-qualifier floating-point 4x4 matrix.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef mat<4, 4, f64, defaultp> f64mat4x4; typedef mat<4, 4, f64, defaultp> f64mat4x4;
@ -846,11 +846,11 @@ namespace glm
////////////////////////// //////////////////////////
// Quaternion types // Quaternion types
/// Single-precision floating-point quaternion. /// Single-qualifier floating-point quaternion.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef tquat<f32, defaultp> f32quat; typedef tquat<f32, defaultp> f32quat;
/// Double-precision floating-point quaternion. /// Double-qualifier floating-point quaternion.
/// @see gtc_type_precision /// @see gtc_type_precision
typedef tquat<f64, defaultp> f64quat; typedef tquat<f64, defaultp> f64quat;

View File

@ -10,7 +10,7 @@ namespace glm
/// Return the constant address to the data of the vector input. /// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, P> const& v) GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, P> const& v)
{ {
return &(v.x); return &(v.x);
@ -18,7 +18,7 @@ namespace glm
//! Return the address to the data of the vector input. //! Return the address to the data of the vector input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(vec<2, T, P>& v) GLM_FUNC_QUALIFIER T* value_ptr(vec<2, T, P>& v)
{ {
return &(v.x); return &(v.x);
@ -26,7 +26,7 @@ namespace glm
/// Return the constant address to the data of the vector input. /// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const * value_ptr(vec<3, T, P> const& v) GLM_FUNC_QUALIFIER T const * value_ptr(vec<3, T, P> const& v)
{ {
return &(v.x); return &(v.x);
@ -34,7 +34,7 @@ namespace glm
//! Return the address to the data of the vector input. //! Return the address to the data of the vector input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(vec<3, T, P>& v) GLM_FUNC_QUALIFIER T* value_ptr(vec<3, T, P>& v)
{ {
return &(v.x); return &(v.x);
@ -42,7 +42,7 @@ namespace glm
/// Return the constant address to the data of the vector input. /// Return the constant address to the data of the vector input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(vec<4, T, P> const& v) GLM_FUNC_QUALIFIER T const* value_ptr(vec<4, T, P> const& v)
{ {
return &(v.x); return &(v.x);
@ -50,7 +50,7 @@ namespace glm
//! Return the address to the data of the vector input. //! Return the address to the data of the vector input.
//! From GLM_GTC_type_ptr extension. //! From GLM_GTC_type_ptr extension.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(vec<4, T, P>& v) GLM_FUNC_QUALIFIER T* value_ptr(vec<4, T, P>& v)
{ {
return &(v.x); return &(v.x);
@ -58,7 +58,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 2, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 2, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -66,7 +66,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 2, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 2, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -74,7 +74,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 3, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 3, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -82,7 +82,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 3, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 3, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -90,7 +90,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 4, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 4, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -98,7 +98,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
//! From GLM_GTC_type_ptr extension. //! From GLM_GTC_type_ptr extension.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 4, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 4, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -106,7 +106,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 3, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 3, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -114,7 +114,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 3, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 3, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -122,7 +122,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 2, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 2, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -130,7 +130,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 2, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 2, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -138,7 +138,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 4, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<2, 4, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -146,7 +146,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 4, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<2, 4, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -154,7 +154,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 2, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 2, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -162,7 +162,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 2, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<4, 2, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -170,7 +170,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 4, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<3, 4, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -178,7 +178,7 @@ namespace glm
//! Return the address to the data of the matrix input. //! Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 4, T, P>& m) GLM_FUNC_QUALIFIER T* value_ptr(mat<3, 4, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -186,7 +186,7 @@ namespace glm
/// Return the constant address to the data of the matrix input. /// Return the constant address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 3, T, P> const& m) GLM_FUNC_QUALIFIER T const* value_ptr(mat<4, 3, T, P> const& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -194,7 +194,7 @@ namespace glm
/// Return the address to the data of the matrix input. /// Return the address to the data of the matrix input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T * value_ptr(mat<4, 3, T, P>& m) GLM_FUNC_QUALIFIER T * value_ptr(mat<4, 3, T, P>& m)
{ {
return &(m[0].x); return &(m[0].x);
@ -202,7 +202,7 @@ namespace glm
/// Return the constant address to the data of the input parameter. /// Return the constant address to the data of the input parameter.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T const * value_ptr(tquat<T, P> const& q) GLM_FUNC_QUALIFIER T const * value_ptr(tquat<T, P> const& q)
{ {
return &(q[0]); return &(q[0]);
@ -210,7 +210,7 @@ namespace glm
/// Return the address to the data of the quaternion input. /// Return the address to the data of the quaternion input.
/// @see gtc_type_ptr /// @see gtc_type_ptr
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T* value_ptr(tquat<T, P>& q) GLM_FUNC_QUALIFIER T* value_ptr(tquat<T, P>& q)
{ {
return &(q[0]); return &(q[0]);

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../detail/type_int.hpp" #include "../detail/type_int.hpp"
#include "../detail/compute_vector_relational.hpp" #include "../detail/compute_vector_relational.hpp"
@ -55,8 +55,8 @@ namespace glm
/// Return the distance in the number of ULP between 2 vectors. /// Return the distance in the number of ULP between 2 vectors.
/// @see gtc_ulp /// @see gtc_ulp
template<typename T, template<int, typename> class vecType> template<typename T, qualifier Q>
GLM_FUNC_DECL vecType<2, uint> float_distance(vecType<2, T> const & x, vecType<2, T> 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

@ -217,10 +217,10 @@ namespace glm
# endif # endif
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> next_float(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> next_float(vec<L, T, P> const & x)
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i]); Result[i] = next_float(x[i]);
return Result; return Result;
@ -252,10 +252,10 @@ namespace glm
# endif # endif
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> prev_float(vecType<L, T, P> const & x) GLM_FUNC_QUALIFIER vec<L, T, P> prev_float(vec<L, T, P> const & x)
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i]); Result[i] = prev_float(x[i]);
return Result; return Result;
@ -270,10 +270,10 @@ namespace glm
return temp; return temp;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> next_float(vecType<L, T, P> const & x, vecType<L, uint, P> const & ulps) GLM_FUNC_QUALIFIER vec<L, T, P> next_float(vec<L, T, P> const & x, vec<L, uint, P> const & ulps)
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = next_float(x[i], ulps[i]); Result[i] = next_float(x[i], ulps[i]);
return Result; return Result;
@ -288,10 +288,10 @@ namespace glm
return temp; return temp;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> prev_float(vecType<L, T, P> const & x, vecType<L, uint, P> const & ulps) GLM_FUNC_QUALIFIER vec<L, T, P> prev_float(vec<L, T, P> const & x, vec<L, uint, P> const & ulps)
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = prev_float(x[i], ulps[i]); Result[i] = prev_float(x[i], ulps[i]);
return Result; return Result;
@ -328,10 +328,10 @@ namespace glm
return ulp; return ulp;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, uint, P> float_distance(vecType<L, T, P> const & x, vecType<L, T, P> const & y) GLM_FUNC_QUALIFIER vec<L, uint, P> float_distance(vec<L, T, P> const & x, vec<L, T, P> const & y)
{ {
vecType<L, uint, P> Result; vec<L, uint, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = float_distance(x[i], y[i]); Result[i] = float_distance(x[i], y[i]);
return Result; return Result;

View File

@ -21,78 +21,78 @@
namespace glm namespace glm
{ {
/// 1 component vector of high precision floating-point numbers. /// 1 component vector of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_vec1_t highp_vec1; typedef highp_vec1_t highp_vec1;
/// 1 component vector of medium precision floating-point numbers. /// 1 component vector of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef mediump_vec1_t mediump_vec1; typedef mediump_vec1_t mediump_vec1;
/// 1 component vector of low precision floating-point numbers. /// 1 component vector of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef lowp_vec1_t lowp_vec1; typedef lowp_vec1_t lowp_vec1;
/// 1 component vector of high precision floating-point numbers. /// 1 component vector of high qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_dvec1_t highp_dvec1; typedef highp_dvec1_t highp_dvec1;
/// 1 component vector of medium precision floating-point numbers. /// 1 component vector of medium qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef mediump_dvec1_t mediump_dvec1; typedef mediump_dvec1_t mediump_dvec1;
/// 1 component vector of low precision floating-point numbers. /// 1 component vector of low qualifier floating-point numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef lowp_dvec1_t lowp_dvec1; typedef lowp_dvec1_t lowp_dvec1;
/// 1 component vector of high precision signed integer numbers. /// 1 component vector of high qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_ivec1_t highp_ivec1; typedef highp_ivec1_t highp_ivec1;
/// 1 component vector of medium precision signed integer numbers. /// 1 component vector of medium qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef mediump_ivec1_t mediump_ivec1; typedef mediump_ivec1_t mediump_ivec1;
/// 1 component vector of low precision signed integer numbers. /// 1 component vector of low qualifier signed integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef lowp_ivec1_t lowp_ivec1; typedef lowp_ivec1_t lowp_ivec1;
/// 1 component vector of high precision unsigned integer numbers. /// 1 component vector of high qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_uvec1_t highp_uvec1; typedef highp_uvec1_t highp_uvec1;
/// 1 component vector of medium precision unsigned integer numbers. /// 1 component vector of medium qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef mediump_uvec1_t mediump_uvec1; typedef mediump_uvec1_t mediump_uvec1;
/// 1 component vector of low precision unsigned integer numbers. /// 1 component vector of low qualifier unsigned integer numbers.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef lowp_uvec1_t lowp_uvec1; typedef lowp_uvec1_t lowp_uvec1;
/// 1 component vector of high precision boolean. /// 1 component vector of high qualifier boolean.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef highp_bvec1_t highp_bvec1; typedef highp_bvec1_t highp_bvec1;
/// 1 component vector of medium precision boolean. /// 1 component vector of medium qualifier boolean.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef mediump_bvec1_t mediump_bvec1; typedef mediump_bvec1_t mediump_bvec1;
/// 1 component vector of low precision boolean. /// 1 component vector of low qualifier boolean.
/// There is no guarantee on the actual precision. /// There is no guarantee on the actual qualifier.
/// @see gtc_vec1 extension. /// @see gtc_vec1 extension.
typedef lowp_bvec1_t lowp_bvec1; typedef lowp_bvec1_t lowp_bvec1;

View File

@ -30,29 +30,29 @@ namespace glm
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b); GLM_FUNC_DECL U associatedMin(T x, U a, T y, U b);
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<2, U, P> associatedMin( GLM_FUNC_DECL vec<2, U, P> associatedMin(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b); vec<L, T, P> const& y, vec<L, U, P> const & b);
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
T x, const vecType<L, U, P>& a, T x, const vec<L, U, P>& a,
T y, const vecType<L, U, P>& b); T y, const vec<L, U, P>& b);
/// Minimum comparison between 2 variables and returns 2 associated variable values /// Minimum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b); vec<L, T, P> const& y, U b);
/// Minimum comparison between 3 variables and returns 3 associated variable values /// Minimum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -64,11 +64,11 @@ namespace glm
/// Minimum comparison between 3 variables and returns 3 associated variable values /// Minimum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c); vec<L, T, P> const& z, vec<L, U, P> const & c);
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -81,30 +81,30 @@ namespace glm
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c, vec<L, T, P> const& z, vec<L, U, P> const & c,
vecType<L, T, P> const& w, vecType<L, U, P> const & d); vec<L, T, P> const& w, vec<L, U, P> const & d);
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c, T z, vec<L, U, P> const & c,
T w, vecType<L, U, P> const & d); T w, vec<L, U, P> const & d);
/// Minimum comparison between 4 variables and returns 4 associated variable values /// Minimum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMin( GLM_FUNC_DECL vec<L, U, P> associatedMin(
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c, vec<L, T, P> const& z, U c,
vecType<L, T, P> const& w, U d); vec<L, T, P> const& w, U d);
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -113,24 +113,24 @@ namespace glm
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vec<2, U, P> associatedMax( GLM_FUNC_DECL vec<2, U, P> associatedMax(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b); vec<L, T, P> const& y, vec<L, U, P> const & b);
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> associatedMax( GLM_FUNC_DECL vec<L, T, P> associatedMax(
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b); T y, vec<L, U, P> const & b);
/// Maximum comparison between 2 variables and returns 2 associated variable values /// Maximum comparison between 2 variables and returns 2 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b); vec<L, T, P> const& y, U b);
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -142,27 +142,27 @@ namespace glm
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c); vec<L, T, P> const& z, vec<L, U, P> const & c);
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> associatedMax( GLM_FUNC_DECL vec<L, T, P> associatedMax(
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c); T z, vec<L, U, P> const & c);
/// Maximum comparison between 3 variables and returns 3 associated variable values /// Maximum comparison between 3 variables and returns 3 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c); vec<L, T, P> const& z, U c);
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
@ -175,30 +175,30 @@ namespace glm
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c, vec<L, T, P> const& z, vec<L, U, P> const & c,
vecType<L, T, P> const& w, vecType<L, U, P> const & d); vec<L, T, P> const& w, vec<L, U, P> const & d);
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c, T z, vec<L, U, P> const & c,
T w, vecType<L, U, P> const & d); T w, vec<L, U, P> const & d);
/// Maximum comparison between 4 variables and returns 4 associated variable values /// Maximum comparison between 4 variables and returns 4 associated variable values
/// @see gtx_associated_min_max /// @see gtx_associated_min_max
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_DECL vecType<L, U, P> associatedMax( GLM_FUNC_DECL vec<L, U, P> associatedMax(
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c, vec<L, T, P> const& z, U c,
vecType<L, T, P> const& w, U d); vec<L, T, P> const& w, U d);
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -4,46 +4,46 @@
namespace glm{ namespace glm{
// Min comparison between 2 variables // Min comparison between 2 variables
template<typename T, typename U, precision P> template<typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)
{ {
return x < y ? a : b; return x < y ? a : b;
} }
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b vec<L, T, P> const& y, vec<L, U, P> const & b
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a[i] : b[i]; Result[i] = x[i] < y[i] ? a[i] : b[i];
return Result; return Result;
} }
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
T x, const vecType<L, U, P>& a, T x, const vec<L, U, P>& a,
T y, const vecType<L, U, P>& b T y, const vec<L, U, P>& b
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x < y ? a[i] : b[i]; Result[i] = x < y ? a[i] : b[i];
return Result; return Result;
} }
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b vec<L, T, P> const& y, U b
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? a : b; Result[i] = x[i] < y[i] ? a : b;
return Result; return Result;
@ -62,15 +62,15 @@ GLM_FUNC_QUALIFIER U associatedMin
return Result; return Result;
} }
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c vec<L, T, P> const& z, vec<L, U, P> const & c
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);
return Result; return Result;
@ -95,16 +95,16 @@ GLM_FUNC_QUALIFIER U associatedMin
} }
// Min comparison between 4 variables // Min comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c, vec<L, T, P> const& z, vec<L, U, P> const & c,
vecType<L, T, P> const& w, vecType<L, U, P> const & d vec<L, T, P> const& w, vec<L, U, P> const & d
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
T Test1 = min(x[i], y[i]); T Test1 = min(x[i], y[i]);
@ -117,19 +117,19 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
} }
// Min comparison between 4 variables // Min comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c, T z, vec<L, U, P> const & c,
T w, vecType<L, U, P> const & d T w, vec<L, U, P> const & d
) )
{ {
T Test1 = min(x, y); T Test1 = min(x, y);
T Test2 = min(z, w); T Test2 = min(z, w);
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
U Result1 = x < y ? a[i] : b[i]; U Result1 = x < y ? a[i] : b[i];
@ -140,16 +140,16 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin
} }
// Min comparison between 4 variables // Min comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMin GLM_FUNC_QUALIFIER vec<L, U, P> associatedMin
( (
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c, vec<L, T, P> const& z, U c,
vecType<L, T, P> const& w, U d vec<L, T, P> const& w, U d
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
T Test1 = min(x[i], y[i]); T Test1 = min(x[i], y[i]);
@ -169,42 +169,42 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)
} }
// Max comparison between 2 variables // Max comparison between 2 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b vec<L, T, P> const& y, vec<L, U, P> const & b
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a[i] : b[i]; Result[i] = x[i] > y[i] ? a[i] : b[i];
return Result; return Result;
} }
// Max comparison between 2 variables // Max comparison between 2 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> associatedMax GLM_FUNC_QUALIFIER vec<L, T, P> associatedMax
( (
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b T y, vec<L, U, P> const & b
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? a[i] : b[i]; Result[i] = x > y ? a[i] : b[i];
return Result; return Result;
} }
// Max comparison between 2 variables // Max comparison between 2 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b vec<L, T, P> const& y, U b
) )
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? a : b; Result[i] = x[i] > y[i] ? a : b;
return Result; return Result;
@ -224,45 +224,45 @@ GLM_FUNC_QUALIFIER U associatedMax
} }
// Max comparison between 3 variables // Max comparison between 3 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c vec<L, T, P> const& z, vec<L, U, P> const & c
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);
return Result; return Result;
} }
// Max comparison between 3 variables // Max comparison between 3 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> associatedMax GLM_FUNC_QUALIFIER vec<L, T, P> associatedMax
( (
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c T z, vec<L, U, P> const & c
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);
return Result; return Result;
} }
// Max comparison between 3 variables // Max comparison between 3 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c vec<L, T, P> const& z, U c
) )
{ {
vecType<L, T, P> Result; vec<L, T, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);
return Result; return Result;
@ -287,16 +287,16 @@ GLM_FUNC_QUALIFIER U associatedMax
} }
// Max comparison between 4 variables // Max comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
vecType<L, T, P> const& x, vecType<L, U, P> const & a, vec<L, T, P> const& x, vec<L, U, P> const & a,
vecType<L, T, P> const& y, vecType<L, U, P> const & b, vec<L, T, P> const& y, vec<L, U, P> const & b,
vecType<L, T, P> const& z, vecType<L, U, P> const & c, vec<L, T, P> const& z, vec<L, U, P> const & c,
vecType<L, T, P> const& w, vecType<L, U, P> const & d vec<L, T, P> const& w, vec<L, U, P> const & d
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
T Test1 = max(x[i], y[i]); T Test1 = max(x[i], y[i]);
@ -309,19 +309,19 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
} }
// Max comparison between 4 variables // Max comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
T x, vecType<L, U, P> const & a, T x, vec<L, U, P> const & a,
T y, vecType<L, U, P> const & b, T y, vec<L, U, P> const & b,
T z, vecType<L, U, P> const & c, T z, vec<L, U, P> const & c,
T w, vecType<L, U, P> const & d T w, vec<L, U, P> const & d
) )
{ {
T Test1 = max(x, y); T Test1 = max(x, y);
T Test2 = max(z, w); T Test2 = max(z, w);
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
U Result1 = x > y ? a[i] : b[i]; U Result1 = x > y ? a[i] : b[i];
@ -332,16 +332,16 @@ GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax
} }
// Max comparison between 4 variables // Max comparison between 4 variables
template<length_t L, typename T, typename U, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, typename U, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, U, P> associatedMax GLM_FUNC_QUALIFIER vec<L, U, P> associatedMax
( (
vecType<L, T, P> const& x, U a, vec<L, T, P> const& x, U a,
vecType<L, T, P> const& y, U b, vec<L, T, P> const& y, U b,
vecType<L, T, P> const& z, U c, vec<L, T, P> const& z, U c,
vecType<L, T, P> const& w, U d vec<L, T, P> const& w, U d
) )
{ {
vecType<L, U, P> Result; vec<L, U, P> Result;
for(length_t i = 0, n = Result.length(); i < n; ++i) for(length_t i = 0, n = Result.length(); i < n; ++i)
{ {
T Test1 = max(x[i], y[i]); T Test1 = max(x[i], y[i]);

View File

@ -39,8 +39,8 @@ namespace glm
/// Find the highest bit set to 1 in a integer variable and return its value. /// Find the highest bit set to 1 in a integer variable and return its value.
/// ///
/// @see gtx_bit /// @see gtx_bit
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_DECL vecType<L, T, P> highestBitValue(vecType<L, T, P> const & value); GLM_FUNC_DECL vec<L, T, P> highestBitValue(vec<L, T, P> const& value);
/// Return the power of two number which value is just higher the input value. /// Return the power of two number which value is just higher the input value.
/// Deprecated, use ceilPowerOfTwo from GTC_round instead /// Deprecated, use ceilPowerOfTwo from GTC_round instead
@ -55,8 +55,8 @@ namespace glm
/// ///
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_DEPRECATED GLM_FUNC_DECL vecType<L, T, P> powerOfTwoAbove(vecType<L, T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, P> powerOfTwoAbove(vec<L, T, P> const& value);
/// Return the power of two number which value is just lower the input value. /// Return the power of two number which value is just lower the input value.
/// Deprecated, use floorPowerOfTwo from GTC_round instead /// Deprecated, use floorPowerOfTwo from GTC_round instead
@ -71,8 +71,8 @@ namespace glm
/// ///
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_DEPRECATED GLM_FUNC_DECL vecType<L, T, P> powerOfTwoBelow(vecType<L, T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, P> powerOfTwoBelow(vec<L, T, P> const& value);
/// Return the power of two number which value is the closet to the input value. /// Return the power of two number which value is the closet to the input value.
/// Deprecated, use roundPowerOfTwo from GTC_round instead /// Deprecated, use roundPowerOfTwo from GTC_round instead
@ -87,8 +87,8 @@ namespace glm
/// ///
/// @see gtc_round /// @see gtc_round
/// @see gtx_bit /// @see gtx_bit
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_DEPRECATED GLM_FUNC_DECL vecType<L, T, P> powerOfTwoNearest(vecType<L, T, P> const & value); GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, P> powerOfTwoNearest(vec<L, T, P> const& value);
/// @} /// @}
} //namespace glm } //namespace glm

View File

@ -19,8 +19,8 @@ namespace glm
return result; return result;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> highestBitValue(vecType<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> highestBitValue(vec<L, T, P> const & v)
{ {
return detail::functor1<L, T, T, P>::call(highestBitValue, v); return detail::functor1<L, T, T, P>::call(highestBitValue, v);
} }
@ -34,8 +34,8 @@ namespace glm
return (Value & (~Value + 1)); return (Value & (~Value + 1));
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> lowestBitValue(vecType<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> lowestBitValue(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(lowestBitValue, v); return detail::functor1<L, T, T, P>::call(lowestBitValue, v);
} }
@ -49,8 +49,8 @@ namespace glm
return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> powerOfTwoAbove(vecType<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> powerOfTwoAbove(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(powerOfTwoAbove, v); return detail::functor1<L, T, T, P>::call(powerOfTwoAbove, v);
} }
@ -64,8 +64,8 @@ namespace glm
return isPowerOfTwo(value) ? value : highestBitValue(value); return isPowerOfTwo(value) ? value : highestBitValue(value);
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> powerOfTwoBelow(vecType<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> powerOfTwoBelow(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(powerOfTwoBelow, v); return detail::functor1<L, T, T, P>::call(powerOfTwoBelow, v);
} }
@ -84,8 +84,8 @@ namespace glm
return (next - value) < (value - prev) ? next : prev; return (next - value) < (value - prev) ? next : prev;
} }
template<length_t L, typename T, precision P, template<length_t, typename, precision> class vecType> template<length_t L, typename T, qualifier P>
GLM_FUNC_QUALIFIER vecType<L, T, P> powerOfTwoNearest(vecType<L, T, P> const & v) GLM_FUNC_QUALIFIER vec<L, T, P> powerOfTwoNearest(vec<L, T, P> const& v)
{ {
return detail::functor1<L, T, T, P>::call(powerOfTwoNearest, v); return detail::functor1<L, T, T, P>::call(powerOfTwoNearest, v);
} }

View File

@ -30,14 +30,14 @@ namespace glm
/// 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, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> closestPointOnLine( GLM_FUNC_DECL vec<3, T, P> closestPointOnLine(
vec<3, T, P> const & point, vec<3, T, P> const & point,
vec<3, T, P> const & a, vec<3, T, P> const & a,
vec<3, T, P> const & b); vec<3, T, P> const & b);
/// 2d lines work as well /// 2d lines work as well
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<2, T, P> closestPointOnLine( GLM_FUNC_DECL vec<2, T, P> closestPointOnLine(
vec<2, T, P> const & point, vec<2, T, P> const & point,
vec<2, T, P> const & a, vec<2, T, P> const & a,

View File

@ -3,7 +3,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine
( (
vec<3, T, P> const & point, vec<3, T, P> const & point,
@ -23,7 +23,7 @@ namespace glm
return a + LineDirection * Distance; return a + LineDirection * Distance;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine
( (
vec<2, T, P> const & point, vec<2, T, P> const & point,

View File

@ -15,7 +15,7 @@
// Dependencies // Dependencies
#include "../detail/setup.hpp" #include "../detail/setup.hpp"
#include "../detail/precision.hpp" #include "../detail/qualifier.hpp"
#include "../vec3.hpp" #include "../vec3.hpp"
#include <limits> #include <limits>
@ -29,19 +29,19 @@ namespace glm
/// @{ /// @{
/// Convert a linear sRGB color to D65 YUV. /// Convert a linear sRGB color to D65 YUV.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB); GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB);
/// Convert a linear sRGB color to D50 YUV. /// Convert a linear sRGB color to D50 YUV.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB); GLM_FUNC_DECL vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB);
/// Convert a D65 YUV color to linear sRGB. /// Convert a D65 YUV color to linear sRGB.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ); GLM_FUNC_DECL vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ);
/// Convert a D65 YUV color to D50 YUV. /// Convert a D65 YUV color to D50 YUV.
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ); GLM_FUNC_DECL vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ);
/// @} /// @}

View File

@ -3,7 +3,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB) GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD65XYZ(vec<3, T, P> const& ColorLinearSRGB)
{ {
vec<3, T, P> const M(0.490f, 0.17697f, 0.2f); vec<3, T, P> const M(0.490f, 0.17697f, 0.2f);
@ -13,7 +13,7 @@ namespace glm
return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast<T>(5.650675255693055f); return (M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB) * static_cast<T>(5.650675255693055f);
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB) GLM_FUNC_QUALIFIER vec<3, T, P> convertLinearSRGBToD50XYZ(vec<3, T, P> const& ColorLinearSRGB)
{ {
vec<3, T, P> const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f); vec<3, T, P> const M(0.436030342570117f, 0.222438466210245f, 0.013897440074263f);
@ -23,7 +23,7 @@ namespace glm
return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB; return M * ColorLinearSRGB + N * ColorLinearSRGB + O * ColorLinearSRGB;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ) GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToLinearSRGB(vec<3, T, P> const& ColorD65XYZ)
{ {
vec<3, T, P> const M(0.41847f, -0.091169f, 0.0009209f); vec<3, T, P> const M(0.41847f, -0.091169f, 0.0009209f);
@ -33,7 +33,7 @@ namespace glm
return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ; return M * ColorD65XYZ + N * ColorD65XYZ + O * ColorD65XYZ;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ) GLM_FUNC_QUALIFIER vec<3, T, P> convertD65XYZToD50XYZ(vec<3, T, P> const& ColorD65XYZ)
{ {
vec<3, T, P> const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f); vec<3, T, P> const M(+1.047844353856414f, +0.029549007606644f, -0.009250984365223f);

View File

@ -30,13 +30,13 @@ namespace glm
/// Converts a color from HSV color space to its color in RGB color space. /// Converts a color from HSV color space to its color in RGB color space.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> rgbColor( GLM_FUNC_DECL vec<3, T, P> rgbColor(
vec<3, T, P> const & hsvValue); vec<3, T, P> const & hsvValue);
/// Converts a color from RGB color space to its color in HSV color space. /// Converts a color from RGB color space to its color in HSV color space.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> hsvColor( GLM_FUNC_DECL vec<3, T, P> hsvColor(
vec<3, T, P> const & rgbValue); vec<3, T, P> const & rgbValue);
@ -48,21 +48,21 @@ namespace glm
/// Modify the saturation of a color. /// Modify the saturation of a color.
/// @see gtx_color_space /// @see gtx_color_space
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<3, T, P> saturation( GLM_FUNC_DECL vec<3, T, P> saturation(
T const s, T const s,
vec<3, T, P> const & color); vec<3, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL vec<4, T, P> saturation( GLM_FUNC_DECL vec<4, T, P> saturation(
T const s, T const s,
vec<4, T, P> const & color); vec<4, T, P> 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, precision P> template<typename T, qualifier P>
GLM_FUNC_DECL T luminosity( GLM_FUNC_DECL T luminosity(
vec<3, T, P> const & color); vec<3, T, P> const & color);

View File

@ -3,7 +3,7 @@
namespace glm namespace glm
{ {
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> rgbColor(const vec<3, T, P>& hsvColor) GLM_FUNC_QUALIFIER vec<3, T, P> rgbColor(const vec<3, T, P>& hsvColor)
{ {
vec<3, T, P> hsv = hsvColor; vec<3, T, P> hsv = hsvColor;
@ -60,7 +60,7 @@ namespace glm
return rgbColor; return rgbColor;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> hsvColor(const vec<3, T, P>& rgbColor) GLM_FUNC_QUALIFIER vec<3, T, P> hsvColor(const vec<3, T, P>& rgbColor)
{ {
vec<3, T, P> hsv = rgbColor; vec<3, T, P> hsv = rgbColor;
@ -121,19 +121,19 @@ namespace glm
return result; return result;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<3, T, P> saturation(const T s, const vec<3, T, P>& color) GLM_FUNC_QUALIFIER vec<3, T, P> saturation(const T s, const vec<3, T, P>& color)
{ {
return vec<3, T, P>(saturation(s) * vec<4, T, P>(color, T(0))); return vec<3, T, P>(saturation(s) * vec<4, T, P>(color, T(0)));
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER vec<4, T, P> saturation(const T s, const vec<4, T, P>& color) GLM_FUNC_QUALIFIER vec<4, T, P> saturation(const T s, const vec<4, T, P>& color)
{ {
return saturation(s) * color; return saturation(s) * color;
} }
template<typename T, precision P> template<typename T, qualifier P>
GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, P>& color) GLM_FUNC_QUALIFIER T luminosity(const vec<3, T, P>& color)
{ {
const vec<3, T, P> tmp = vec<3, T, P>(0.33, 0.59, 0.11); const vec<3, T, P> tmp = vec<3, T, P>(0.33, 0.59, 0.11);

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