diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index a30929da..5f40ed5b 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -189,11 +189,11 @@ namespace glm template GLM_FUNC_DECL tmat2x4 operator/ ( tmat2x4 const & m, - T const & s); + T s); template GLM_FUNC_DECL tmat2x4 operator/ ( - T const & s, + T s, tmat2x4 const & m); // Unary constant operators diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 94b46140..e2ef8d90 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -441,7 +441,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/(tmat2x4 const & m, T const & s) + GLM_FUNC_QUALIFIER tmat2x4 operator/(tmat2x4 const & m, T s) { return tmat2x4( m[0] / s, @@ -449,7 +449,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tmat2x4 operator/(T const & s, tmat2x4 const & m) + GLM_FUNC_QUALIFIER tmat2x4 operator/(T s, tmat2x4 const & m) { return tmat2x4( s / m[0], diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 9dc3e8a8..18fda9ae 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -155,8 +155,8 @@ namespace detail // Explicit basic constructors GLM_FUNC_DECL explicit tvec4(ctor); - GLM_FUNC_DECL explicit tvec4(T const & s); - GLM_FUNC_DECL tvec4(T const & s0, T const & s1, T const & s2, T const & s3); + GLM_FUNC_DECL explicit tvec4(T s); + GLM_FUNC_DECL tvec4(T a, T b, T c, T d); GLM_FUNC_DECL ~tvec4(){} ////////////////////////////////////// @@ -164,7 +164,7 @@ namespace detail /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL tvec4(A const & x, B const & y, C const & z, D const & w); + GLM_FUNC_DECL tvec4(A a, B b, C c, D d); template GLM_FUNC_DECL tvec4(tvec1 const & a, tvec1 const & b, tvec1 const & c, tvec1 const & d); @@ -173,31 +173,31 @@ namespace detail //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL explicit tvec4(tvec2 const & a, B const & b, C const & c); + GLM_FUNC_DECL explicit tvec4(tvec2 const & a, B b, C c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec2 const & a, tvec1 const & b, tvec1 const & c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL explicit tvec4(A const & a, tvec2 const & b, C const & c); + GLM_FUNC_DECL explicit tvec4(A a, tvec2 const & b, C c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec1 const & a, tvec2 const & b, tvec1 const & c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL explicit tvec4(A const & a, B const & b, tvec2 const & c); + GLM_FUNC_DECL explicit tvec4(A a, B b, tvec2 const & c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec1 const & a, tvec1 const & b, tvec2 const & c); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL explicit tvec4(tvec3 const & a, B const & b); + GLM_FUNC_DECL explicit tvec4(tvec3 const & a, B b); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec3 const & a, tvec1 const & b); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template - GLM_FUNC_DECL explicit tvec4(A const & a, tvec3 const & b); + GLM_FUNC_DECL explicit tvec4(A a, tvec3 const & b); //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec1 const & a, tvec3 const & b); @@ -261,25 +261,25 @@ namespace detail template GLM_FUNC_DECL tvec4 & operator=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator+=(U s); + GLM_FUNC_DECL tvec4 & operator+=(U scalar); template GLM_FUNC_DECL tvec4 & operator+=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator-=(U s); + GLM_FUNC_DECL tvec4 & operator-=(U scalar); template GLM_FUNC_DECL tvec4 & operator-=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator*=(U s); + GLM_FUNC_DECL tvec4 & operator*=(U scalar); template GLM_FUNC_DECL tvec4 & operator*=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator/=(U s); + GLM_FUNC_DECL tvec4 & operator/=(U scalar); template GLM_FUNC_DECL tvec4 & operator/=(tvec1 const & v); template @@ -297,37 +297,37 @@ namespace detail // Unary bit operators template - GLM_FUNC_DECL tvec4 & operator%=(U s); + GLM_FUNC_DECL tvec4 & operator%=(U scalar); template GLM_FUNC_DECL tvec4 & operator%=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator%=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator&=(U s); + GLM_FUNC_DECL tvec4 & operator&=(U scalar); template GLM_FUNC_DECL tvec4 & operator&=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator&=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator|=(U s); + GLM_FUNC_DECL tvec4 & operator|=(U scalar); template GLM_FUNC_DECL tvec4 & operator|=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator|=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator^=(U s); + GLM_FUNC_DECL tvec4 & operator^=(U scalar); template GLM_FUNC_DECL tvec4 & operator^=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator^=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator<<=(U s); + GLM_FUNC_DECL tvec4 & operator<<=(U scalar); template GLM_FUNC_DECL tvec4 & operator<<=(tvec1 const & v); template GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); template - GLM_FUNC_DECL tvec4 & operator>>=(U s); + GLM_FUNC_DECL tvec4 & operator>>=(U scalar); template GLM_FUNC_DECL tvec4 & operator>>=(tvec1 const & v); template @@ -335,13 +335,13 @@ namespace detail }; template - GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator+(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator+(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator+(tvec1 const & s, tvec4 const & v); @@ -350,13 +350,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator+(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator-(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator-(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator-(tvec1 const & s, tvec4 const & v); @@ -365,13 +365,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator-(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator*(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator*(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator*(tvec1 const & s, tvec4 const & v); @@ -380,13 +380,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator*(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator/(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator/(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator/(tvec1 const & s, tvec4 const & v); @@ -404,13 +404,13 @@ namespace detail GLM_FUNC_DECL bool operator!=(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator%(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator%(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator%(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator%(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator%(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator%(tvec1 const & s, tvec4 const & v); @@ -419,13 +419,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator%(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator&(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator&(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator&(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator&(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator&(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator&(tvec1 const & s, tvec4 const & v); @@ -434,13 +434,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator&(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator|(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator|(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator|(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator|(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator|(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator|(tvec1 const & s, tvec4 const & v); @@ -449,13 +449,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator|(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator^(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator^(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator^(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator^(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator^(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator^(tvec1 const & s, tvec4 const & v); @@ -464,13 +464,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator^(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator<<(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator<<(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator<<(tvec1 const & s, tvec4 const & v); @@ -479,13 +479,13 @@ namespace detail GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v, T const & s); + GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v, T scalar); template GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v, tvec1 const & s); template - GLM_FUNC_DECL tvec4 operator>>(T const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator>>(T scalar, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator>>(tvec1 const & s, tvec4 const & v); diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 5c0630e8..292597d8 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -99,35 +99,35 @@ namespace glm {} template - GLM_FUNC_QUALIFIER tvec4::tvec4(T const & s) + GLM_FUNC_QUALIFIER tvec4::tvec4(T s) : x(s), y(s), z(s), w(s) {} #if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2) template <> - GLM_FUNC_QUALIFIER tvec4::tvec4(float const & s) : + GLM_FUNC_QUALIFIER tvec4::tvec4(float s) : data(_mm_set1_ps(s)) {} template <> - GLM_FUNC_QUALIFIER tvec4::tvec4(float const & s) : + GLM_FUNC_QUALIFIER tvec4::tvec4(float s) : data(_mm_set1_ps(s)) {} #endif template - GLM_FUNC_QUALIFIER tvec4::tvec4(T const & a, T const & b, T const & c, T const & d) + GLM_FUNC_QUALIFIER tvec4::tvec4(T a, T b, T c, T d) : x(a), y(b), z(c), w(d) {} #if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2) template <> - GLM_FUNC_QUALIFIER tvec4::tvec4(float const & a, float const & b, float const & c, float const & d) : + GLM_FUNC_QUALIFIER tvec4::tvec4(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} template <> - GLM_FUNC_QUALIFIER tvec4::tvec4(float const & a, float const & b, float const & c, float const & d) : + GLM_FUNC_QUALIFIER tvec4::tvec4(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} #endif @@ -137,7 +137,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(A const & a, B const & b, C const & c, D const & d) : + GLM_FUNC_QUALIFIER tvec4::tvec4(A a, B b, C c, D d) : x(static_cast(a)), y(static_cast(b)), z(static_cast(c)), @@ -158,7 +158,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(tvec2 const & a, B const & b, C const & c) : + GLM_FUNC_QUALIFIER tvec4::tvec4(tvec2 const & a, B b, C c) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(b)), @@ -176,7 +176,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(A const & s1, tvec2 const & v, C const & s2) : + GLM_FUNC_QUALIFIER tvec4::tvec4(A s1, tvec2 const & v, C s2) : x(static_cast(s1)), y(static_cast(v.x)), z(static_cast(v.y)), @@ -194,7 +194,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(A const & s1, B const & s2, tvec2 const & v) : + GLM_FUNC_QUALIFIER tvec4::tvec4(A s1, B s2, tvec2 const & v) : x(static_cast(s1)), y(static_cast(s2)), z(static_cast(v.x)), @@ -212,7 +212,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(tvec3 const & a, B const & b) : + GLM_FUNC_QUALIFIER tvec4::tvec4(tvec3 const & a, B b) : x(static_cast(a.x)), y(static_cast(a.y)), z(static_cast(a.z)), @@ -230,7 +230,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4::tvec4(A const & a, tvec3 const & b) : + GLM_FUNC_QUALIFIER tvec4::tvec4(A a, tvec3 const & b) : x(static_cast(a)), y(static_cast(b.x)), z(static_cast(b.y)), @@ -280,74 +280,75 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U scalar) { - this->x += static_cast(s); - this->y += static_cast(s); - this->z += static_cast(s); - this->w += static_cast(s); + this->x += static_cast(scalar); + this->y += static_cast(scalar); + this->z += static_cast(scalar); + this->w += static_cast(scalar); return *this; } #if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2) template <> template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U scalar) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(s))); + this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(scalar))); return *this; } template <> template <> - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(float s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(float scalar) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(s)); + this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar)); return *this; } template <> template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U scalar) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(s))); + this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(scalar))); return *this; } template <> template <> - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(float s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(float scalar) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(s)); + this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar)); return *this; } #endif template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & v) { - this->x += static_cast(s); - this->y += static_cast(s); - this->z += static_cast(s); - this->w += static_cast(s); + T const scalar = static_cast(v.x); + this->x += scalar; + this->y += scalar; + this->z += scalar; + this->w += scalar; return *this; } #if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2) template <> template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & v) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(s))); + this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(v.x))); return *this; } template <> template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & v) { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(s))); + this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(v.x))); return *this; } #endif @@ -365,12 +366,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(U scalar) { - this->x -= static_cast(s); - this->y -= static_cast(s); - this->z -= static_cast(s); - this->w -= static_cast(s); + this->x -= static_cast(scalar); + this->y -= static_cast(scalar); + this->z -= static_cast(scalar); + this->w -= static_cast(scalar); return *this; } @@ -378,10 +379,11 @@ namespace glm template GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-=(tvec1 const & v) { - this->x -= static_cast(v.x); - this->y -= static_cast(v.x); - this->z -= static_cast(v.x); - this->w -= static_cast(v.x); + T const scalar = static_cast(v.x); + this->x -= scalar; + this->y -= scalar; + this->z -= scalar; + this->w -= scalar; return *this; } @@ -506,12 +508,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%=(U scalar) { - this->x %= static_cast(s); - this->y %= static_cast(s); - this->z %= static_cast(s); - this->w %= static_cast(s); + this->x %= static_cast(scalar); + this->y %= static_cast(scalar); + this->z %= static_cast(scalar); + this->w %= static_cast(scalar); return *this; } @@ -539,12 +541,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&=(U scalar) { - this->x &= static_cast(s); - this->y &= static_cast(s); - this->z &= static_cast(s); - this->w &= static_cast(s); + this->x &= static_cast(scalar); + this->y &= static_cast(scalar); + this->z &= static_cast(scalar); + this->w &= static_cast(scalar); return *this; } @@ -572,12 +574,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|=(U scalar) { - this->x |= static_cast(s); - this->y |= static_cast(s); - this->z |= static_cast(s); - this->w |= static_cast(s); + this->x |= static_cast(scalar); + this->y |= static_cast(scalar); + this->z |= static_cast(scalar); + this->w |= static_cast(scalar); return *this; } @@ -605,12 +607,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^=(U scalar) { - this->x ^= static_cast(s); - this->y ^= static_cast(s); - this->z ^= static_cast(s); - this->w ^= static_cast(s); + this->x ^= static_cast(scalar); + this->y ^= static_cast(scalar); + this->z ^= static_cast(scalar); + this->w ^= static_cast(scalar); return *this; } @@ -638,12 +640,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<=(U scalar) { - this->x <<= static_cast(s); - this->y <<= static_cast(s); - this->z <<= static_cast(s); - this->w <<= static_cast(s); + this->x <<= static_cast(scalar); + this->y <<= static_cast(scalar); + this->z <<= static_cast(scalar); + this->w <<= static_cast(scalar); return *this; } @@ -671,12 +673,12 @@ namespace glm template template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>=(U s) + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>=(U scalar) { - this->x >>= static_cast(s); - this->y >>= static_cast(s); - this->z >>= static_cast(s); - this->w >>= static_cast(s); + this->x >>= static_cast(scalar); + this->y >>= static_cast(scalar); + this->z >>= static_cast(scalar); + this->w >>= static_cast(scalar); return *this; } @@ -721,23 +723,23 @@ namespace glm // Binary arithmetic operators template - GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator+(tvec4 const & v, T scalar) { return tvec4( - v.x + s, - v.y + s, - v.z + s, - v.w + s); + v.x + scalar, + v.y + scalar, + v.z + scalar, + v.w + scalar); } template - GLM_FUNC_QUALIFIER tvec4 operator+(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator+(T scalar, tvec4 const & v) { return tvec4( - s + v.x, - s + v.y, - s + v.z, - s + v.w); + scalar + v.x, + scalar + v.y, + scalar + v.z, + scalar + v.w); } template @@ -752,23 +754,23 @@ namespace glm //operator- template - GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator-(tvec4 const & v, T scalar) { return tvec4( - v.x - s, - v.y - s, - v.z - s, - v.w - s); + v.x - scalar, + v.y - scalar, + v.z - scalar, + v.w - scalar); } template - GLM_FUNC_QUALIFIER tvec4 operator-(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator-(T scalar, tvec4 const & v) { return tvec4( - s - v.x, - s - v.y, - s - v.z, - s - v.w); + scalar - v.x, + scalar - v.y, + scalar - v.z, + scalar - v.w); } template @@ -783,23 +785,23 @@ namespace glm //operator* template - GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator*(tvec4 const & v, T scalar) { return tvec4( - v.x * s, - v.y * s, - v.z * s, - v.w * s); + v.x * scalar, + v.y * scalar, + v.z * scalar, + v.w * scalar); } template - GLM_FUNC_QUALIFIER tvec4 operator*(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator*(T scalar, tvec4 const & v) { return tvec4( - s * v.x, - s * v.y, - s * v.z, - s * v.w); + scalar * v.x, + scalar * v.y, + scalar * v.z, + scalar * v.w); } template @@ -814,23 +816,23 @@ namespace glm //operator/ template - GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator/(tvec4 const & v, T scalar) { return tvec4( - v.x / s, - v.y / s, - v.z / s, - v.w / s); + v.x / scalar, + v.y / scalar, + v.z / scalar, + v.w / scalar); } template - GLM_FUNC_QUALIFIER tvec4 operator/(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator/(T scalar, tvec4 const & v) { return tvec4( - s / v.x, - s / v.y, - s / v.z, - s / v.w); + scalar / v.x, + scalar / v.y, + scalar / v.z, + scalar / v.w); } template @@ -858,7 +860,7 @@ namespace glm // Binary bit operators template - GLM_FUNC_QUALIFIER tvec4 operator%(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator%(tvec4 const & v, T s) { return tvec4( v.x % s, @@ -878,7 +880,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator%(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator%(T s, tvec4 const & v) { return tvec4( s % v.x, @@ -908,7 +910,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator&(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator&(tvec4 const & v, T s) { return tvec4( v.x & s, @@ -928,7 +930,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator&(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator&(T s, tvec4 const & v) { return tvec4( s & v.x, @@ -958,7 +960,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, T s) { return tvec4( v.x | s, @@ -978,7 +980,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator|(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator|(T s, tvec4 const & v) { return tvec4( s | v.x, @@ -1008,7 +1010,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator^(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator^(tvec4 const & v, T s) { return tvec4( v.x ^ s, @@ -1028,13 +1030,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator^(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator^(T scalar, tvec4 const & v) { return tvec4( - s ^ v.x, - s ^ v.y, - s ^ v.z, - s ^ v.w); + scalar ^ v.x, + scalar ^ v.y, + scalar ^ v.z, + scalar ^ v.w); } template @@ -1058,13 +1060,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator<<(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator<<(tvec4 const & left, T scalar) { return tvec4( - v.x << s, - v.y << s, - v.z << s, - v.w << s); + v.x << scalar, + v.y << scalar, + v.z << scalar, + v.w << scalar); } template @@ -1078,13 +1080,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator<<(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator<<(T scalar, tvec4 const & v) { return tvec4( - s << v.x, - s << v.y, - s << v.z, - s << v.w); + scalar << v.x, + scalar << v.y, + scalar << v.z, + scalar << v.w); } template @@ -1108,13 +1110,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator>>(tvec4 const & v, T const & s) + GLM_FUNC_QUALIFIER tvec4 operator>>(tvec4 const & v, T scalar) { return tvec4( - v.x >> s, - v.y >> s, - v.z >> s, - v.w >> s); + v.x >> scalar, + v.y >> scalar, + v.z >> scalar, + v.w >> scalar); } template @@ -1128,13 +1130,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tvec4 operator>>(T const & s, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator>>(T scalar, tvec4 const & v) { return tvec4( - s >> v.x, - s >> v.y, - s >> v.z, - s >> v.w); + scalar >> v.x, + scalar >> v.y, + scalar >> v.z, + scalar >> v.w); } template diff --git a/glm/gtc/vec1.hpp b/glm/gtc/vec1.hpp index 93c6ecec..29370b30 100644 --- a/glm/gtc/vec1.hpp +++ b/glm/gtc/vec1.hpp @@ -20,18 +20,18 @@ /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// -/// @ref gtx_vec1 -/// @file glm/gtx/vec1.hpp +/// @ref gtc_vec1 +/// @file glm/gtc/vec1.hpp /// @date 2010-02-08 / 2011-06-07 /// @author Christophe Riccio /// /// @see core (dependence) /// -/// @defgroup gtx_vec1 GLM_GTX_vec1 +/// @defgroup gtc_vec1 GLM_GTX_vec1 /// @ingroup gtx /// /// @brief Add vec1, ivec1, uvec1 and bvec1 types. -/// need to be included to use these functionalities. +/// need to be included to use these functionalities. /////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -41,84 +41,84 @@ #include "../detail/type_vec1.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_vec1 extension included") +# pragma message("GLM: GLM_GTC_vec1 extension included") #endif namespace glm { - //! 1 component vector of high precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef highp_vec1_t highp_vec1; - //! 1 component vector of medium precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef mediump_vec1_t mediump_vec1; - //! 1 component vector of low precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef lowp_vec1_t lowp_vec1; - //! 1 component vector of high precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef highp_dvec1_t highp_dvec1; - //! 1 component vector of medium precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef mediump_dvec1_t mediump_dvec1; - //! 1 component vector of low precision floating-point numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef lowp_dvec1_t lowp_dvec1; - //! 1 component vector of high precision signed integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef highp_ivec1_t highp_ivec1; - //! 1 component vector of medium precision signed integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef mediump_ivec1_t mediump_ivec1; - //! 1 component vector of low precision signed integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef lowp_ivec1_t lowp_ivec1; - //! 1 component vector of high precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef highp_uvec1_t highp_uvec1; - //! 1 component vector of medium precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef mediump_uvec1_t mediump_uvec1; - //! 1 component vector of low precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef lowp_uvec1_t lowp_uvec1; - //! 1 component vector of high precision boolean. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of high precision boolean. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef highp_bvec1_t highp_bvec1; - //! 1 component vector of medium precision boolean. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of medium precision boolean. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef mediump_bvec1_t mediump_bvec1; - //! 1 component vector of low precision boolean. - //! There is no guarantee on the actual precision. - /// @see gtx_vec1 extension. + /// 1 component vector of low precision boolean. + /// There is no guarantee on the actual precision. + /// @see gtc_vec1 extension. typedef lowp_bvec1_t lowp_bvec1; ////////////////////////// @@ -132,7 +132,7 @@ namespace glm typedef lowp_bvec1 bvec1; #else /// 1 component vector of boolean. - /// @see gtx_vec1 extension. + /// @see gtc_vec1 extension. typedef highp_bvec1 bvec1; #endif//GLM_PRECISION @@ -144,7 +144,7 @@ namespace glm typedef lowp_vec1 vec1; #else /// 1 component vector of floating-point numbers. - /// @see gtx_vec1 extension. + /// @see gtc_vec1 extension. typedef highp_vec1 vec1; #endif//GLM_PRECISION @@ -156,7 +156,7 @@ namespace glm typedef lowp_dvec1 dvec1; #else /// 1 component vector of floating-point numbers. - /// @see gtx_vec1 extension. + /// @see gtc_vec1 extension. typedef highp_dvec1 dvec1; #endif//GLM_PRECISION @@ -168,7 +168,7 @@ namespace glm typedef lowp_ivec1 ivec1; #else /// 1 component vector of signed integer numbers. - /// @see gtx_vec1 extension. + /// @see gtc_vec1 extension. typedef highp_ivec1 ivec1; #endif//GLM_PRECISION @@ -180,7 +180,7 @@ namespace glm typedef lowp_uvec1 uvec1; #else /// 1 component vector of unsigned integer numbers. - /// @see gtx_vec1 extension. + /// @see gtc_vec1 extension. typedef highp_uvec1 uvec1; #endif//GLM_PRECISION diff --git a/glm/gtc/vec1.inl b/glm/gtc/vec1.inl index b1ce4367..d8322494 100644 --- a/glm/gtc/vec1.inl +++ b/glm/gtc/vec1.inl @@ -20,8 +20,8 @@ /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// THE SOFTWARE. /// -/// @ref gtx_vec1 -/// @file glm/gtx/vec1.inl +/// @ref gtc_vec1 +/// @file glm/gtc/vec1.inl /// @date 2013-03-16 / 2013-03-16 /// @author Christophe Riccio ///////////////////////////////////////////////////////////////////////////////////