diff --git a/glm/detail/_noise.hpp b/glm/detail/_noise.hpp index 68629ca4..5a2d46b3 100644 --- a/glm/detail/_noise.hpp +++ b/glm/detail/_noise.hpp @@ -12,73 +12,73 @@ namespace glm{ namespace detail { template - GLM_FUNC_QUALIFIER T mod289(T const & x) + GLM_FUNC_QUALIFIER T mod289(T const& x) { return x - floor(x * (static_cast(1.0) / static_cast(289.0))) * static_cast(289.0); } template - GLM_FUNC_QUALIFIER T permute(T const & x) + GLM_FUNC_QUALIFIER T permute(T const& x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - 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(34)) + static_cast(1)) * x); } template - 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(34)) + static_cast(1)) * x); } template - 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(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r) + GLM_FUNC_QUALIFIER T taylorInvSqrt(T const& r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - 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; } template - 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; } template - 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; } template - 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)); } template - 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)); } template - 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)); } diff --git a/glm/detail/_swizzle.hpp b/glm/detail/_swizzle.hpp index 0eb5805a..6f38b011 100644 --- a/glm/detail/_swizzle.hpp +++ b/glm/detail/_swizzle.hpp @@ -137,7 +137,7 @@ namespace detail { struct Stub {}; - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; } + GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const&) { return *this; } GLM_FUNC_QUALIFIER T operator[] (size_t i) const { diff --git a/glm/detail/_vectorize.hpp b/glm/detail/_vectorize.hpp index ca84184f..e07a79d5 100644 --- a/glm/detail/_vectorize.hpp +++ b/glm/detail/_vectorize.hpp @@ -17,7 +17,7 @@ namespace detail template 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) { return vec<1, R, P>(Func(v.x)); } @@ -26,7 +26,7 @@ namespace detail template 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) { return vec<2, R, P>(Func(v.x), Func(v.y)); } @@ -35,7 +35,7 @@ namespace detail template 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) { return vec<3, R, P>(Func(v.x), Func(v.y), Func(v.z)); } @@ -44,7 +44,7 @@ namespace detail template 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) { return vec<4, R, P>(Func(v.x), Func(v.y), Func(v.z), Func(v.w)); } @@ -56,7 +56,7 @@ namespace detail template 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) { return vec<1, T, P>(Func(a.x, b.x)); } @@ -65,7 +65,7 @@ namespace detail template 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) { return vec<2, T, P>(Func(a.x, b.x), Func(a.y, b.y)); } @@ -74,7 +74,7 @@ namespace detail template 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) { return vec<3, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z)); } @@ -83,7 +83,7 @@ namespace detail template 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) { return vec<4, T, P>(Func(a.x, b.x), Func(a.y, b.y), Func(a.z, b.z), Func(a.w, b.w)); } @@ -95,7 +95,7 @@ namespace detail template 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) { return vec<1, T, P>(Func(a.x, b)); } @@ -104,7 +104,7 @@ namespace detail template 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) { return vec<2, T, P>(Func(a.x, b), Func(a.y, b)); } @@ -113,7 +113,7 @@ namespace detail template 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) { return vec<3, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b)); } @@ -122,7 +122,7 @@ namespace detail template 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) { return vec<4, T, P>(Func(a.x, b), Func(a.y, b), Func(a.z, b), Func(a.w, b)); } diff --git a/glm/detail/dummy.cpp b/glm/detail/dummy.cpp index 3311fbef..6ab8f036 100644 --- a/glm/detail/dummy.cpp +++ b/glm/detail/dummy.cpp @@ -44,9 +44,9 @@ struct light glm::vec3 computeNormal ( - glm::vec3 const & a, - glm::vec3 const & b, - glm::vec3 const & c + glm::vec3 const& a, + glm::vec3 const& b, + glm::vec3 const& c ) { return glm::normalize(glm::cross(c - a, b - a)); @@ -62,7 +62,7 @@ void glUniformMatrix4fv(GLuint, int, int, float*){} #include // glm::mat4 #include // glm::translate, glm::rotate, glm::scale, glm::perspective #include // glm::value_ptr -void func(GLuint LocationMVP, float Translate, glm::vec2 const & Rotate) +void func(GLuint LocationMVP, float Translate, glm::vec2 const& Rotate) { glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); @@ -132,10 +132,10 @@ struct intersection #include // glm::vecRand3 glm::vec3 lighting ( - intersection const & Intersection, - material const & Material, - light const & Light, - glm::vec3 const & View + intersection const& Intersection, + material const& Material, + light const& Light, + glm::vec3 const& View ) { glm::vec3 Color(0.0f); diff --git a/glm/detail/func_common.hpp b/glm/detail/func_common.hpp index 1fce0dfd..90fd8d6c 100644 --- a/glm/detail/func_common.hpp +++ b/glm/detail/func_common.hpp @@ -264,7 +264,7 @@ namespace glm /// @see GLSL clamp man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions template - GLM_FUNC_DECL vec clamp(vec const & x, T minVal, T maxVal); + GLM_FUNC_DECL vec clamp(vec const& x, T minVal, T maxVal); /// Returns min(max(x, minVal), maxVal) for each component in x /// using the floating-point values minVal and maxVal. @@ -419,7 +419,7 @@ namespace glm /// /// @see GLSL floatBitsToInt man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - GLM_FUNC_DECL int floatBitsToInt(float const & v); + GLM_FUNC_DECL int floatBitsToInt(float const& v); /// Returns a signed integer value representing /// the encoding of a floating-point value. The floatingpoint @@ -439,7 +439,7 @@ namespace glm /// /// @see GLSL floatBitsToUint man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - GLM_FUNC_DECL uint floatBitsToUint(float const & v); + GLM_FUNC_DECL uint floatBitsToUint(float const& v); /// Returns a unsigned integer value representing /// the encoding of a floating-point value. The floatingpoint @@ -461,7 +461,7 @@ namespace glm /// /// @see GLSL intBitsToFloat man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - GLM_FUNC_DECL float intBitsToFloat(int const & v); + GLM_FUNC_DECL float intBitsToFloat(int const& v); /// Returns a floating-point value corresponding to a signed /// integer encoding of a floating-point value. @@ -485,7 +485,7 @@ namespace glm /// /// @see GLSL uintBitsToFloat man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - GLM_FUNC_DECL float uintBitsToFloat(uint const & v); + GLM_FUNC_DECL float uintBitsToFloat(uint const& v); /// Returns a floating-point value corresponding to a /// unsigned integer encoding of a floating-point value. diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index a1a1851f..6857faff 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -110,7 +110,7 @@ namespace detail template struct compute_abs_vector { - GLM_FUNC_QUALIFIER static vec call(vec const & x) + GLM_FUNC_QUALIFIER static vec call(vec const& x) { return detail::functor1::call(abs, x); } @@ -312,7 +312,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec abs(vec const & x) + GLM_FUNC_QUALIFIER vec abs(vec const& x) { return detail::compute_abs_vector::value>::call(x); } @@ -406,7 +406,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec roundEven(vec const & x) + GLM_FUNC_QUALIFIER vec roundEven(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'roundEven' only accept floating-point inputs"); return detail::functor1::call(roundEven, x); @@ -415,7 +415,7 @@ namespace detail // ceil using ::std::ceil; template - GLM_FUNC_QUALIFIER vec ceil(vec const & x) + GLM_FUNC_QUALIFIER vec ceil(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'ceil' only accept floating-point inputs"); return detail::compute_ceil::value>::call(x); @@ -429,7 +429,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fract(vec const & x) + GLM_FUNC_QUALIFIER vec fract(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fract' only accept floating-point inputs"); return detail::compute_fract::value>::call(x); @@ -449,7 +449,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec mod(vec const & x, T y) + GLM_FUNC_QUALIFIER vec mod(vec const& x, T y) { return detail::compute_mod::value>::call(x, vec(y)); } @@ -469,14 +469,14 @@ namespace detail } template - 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>( modf(x.x, i.x)); } template - 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>( modf(x.x, i.x), @@ -484,7 +484,7 @@ namespace detail } template - 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>( modf(x.x, i.x), @@ -493,7 +493,7 @@ namespace detail } template - 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>( modf(x.x, i.x), @@ -512,7 +512,7 @@ namespace detail // min template - GLM_FUNC_QUALIFIER vec min(vec const & a, T b) + GLM_FUNC_QUALIFIER vec min(vec const& a, T b) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'min' only accept floating-point or integer inputs"); return detail::compute_min_vector::value>::call(a, vec(b)); @@ -533,7 +533,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec max(vec const& a, vec const & b) + GLM_FUNC_QUALIFIER vec max(vec const& a, vec const& b) { return detail::compute_max_vector::value>::call(a, b); } @@ -547,7 +547,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec clamp(vec const & x, T minVal, T maxVal) + GLM_FUNC_QUALIFIER vec clamp(vec const& x, T minVal, T maxVal) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "'clamp' only accept floating-point or integer inputs"); return detail::compute_clamp_vector::value>::call(x, vec(minVal), vec(maxVal)); @@ -732,7 +732,7 @@ namespace detail return reinterpret_cast&>(const_cast&>(v)); } - GLM_FUNC_QUALIFIER float intBitsToFloat(int const & v) + GLM_FUNC_QUALIFIER float intBitsToFloat(int const& v) { union { diff --git a/glm/detail/func_common_simd.inl b/glm/detail/func_common_simd.inl index 26904757..7cf0ea36 100644 --- a/glm/detail/func_common_simd.inl +++ b/glm/detail/func_common_simd.inl @@ -13,7 +13,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_abs(v.data); @@ -24,7 +24,7 @@ namespace detail template 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) { vec<4, int, P> result; result.data = glm_ivec4_abs(v.data); @@ -35,7 +35,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_floor(v.data); @@ -46,7 +46,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_ceil(v.data); @@ -57,7 +57,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_fract(v.data); @@ -68,7 +68,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_round(v.data); @@ -79,7 +79,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = glm_vec4_mod(x.data, y.data); @@ -90,7 +90,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = _mm_min_ps(v1.data, v2.data); @@ -101,7 +101,7 @@ namespace detail template 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) { vec<4, int32, P> result; result.data = _mm_min_epi32(v1.data, v2.data); @@ -112,7 +112,7 @@ namespace detail template 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) { vec<4, uint32, P> result; result.data = _mm_min_epu32(v1.data, v2.data); @@ -123,7 +123,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = _mm_max_ps(v1.data, v2.data); @@ -134,7 +134,7 @@ namespace detail template 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) { vec<4, int32, P> result; result.data = _mm_max_epi32(v1.data, v2.data); @@ -145,7 +145,7 @@ namespace detail template 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) { vec<4, uint32, P> result; result.data = _mm_max_epu32(v1.data, v2.data); @@ -156,7 +156,7 @@ namespace detail template 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) { vec<4, float, P> result; result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data); @@ -167,7 +167,7 @@ namespace detail template 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) { vec<4, int32, P> result; result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data); @@ -178,7 +178,7 @@ namespace detail template 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) { vec<4, uint32, P> result; result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data); @@ -189,7 +189,7 @@ namespace detail template 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) { __m128i const Load = _mm_set_epi32(-static_cast(a.w), -static_cast(a.z), -static_cast(a.y), -static_cast(a.x)); __m128 const Mask = _mm_castsi128_ps(Load); diff --git a/glm/detail/func_exponential.hpp b/glm/detail/func_exponential.hpp index 2f27ea3b..c0289cae 100644 --- a/glm/detail/func_exponential.hpp +++ b/glm/detail/func_exponential.hpp @@ -29,7 +29,7 @@ namespace glm /// @see GLSL pow man page /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions template - GLM_FUNC_DECL vec pow(vec const & base, vec const& exponent); + GLM_FUNC_DECL vec pow(vec const& base, vec const& exponent); /// Returns the natural exponentiation of x, i.e., e^x. /// @@ -87,7 +87,7 @@ namespace glm /// @see GLSL sqrt man page /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions template - GLM_FUNC_DECL vec sqrt(vec const & v); + GLM_FUNC_DECL vec sqrt(vec const& v); /// Returns the reciprocal of the positive square root of v. /// @@ -98,7 +98,7 @@ namespace glm /// @see GLSL inversesqrt man page /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions template - GLM_FUNC_DECL vec inversesqrt(vec const & v); + GLM_FUNC_DECL vec inversesqrt(vec const& v); /// @} }//namespace glm diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index ce0e10af..faea7dea 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -41,7 +41,7 @@ namespace detail template struct compute_inversesqrt { - GLM_FUNC_QUALIFIER static vec call(vec const & x) + GLM_FUNC_QUALIFIER static vec call(vec const& x) { return static_cast(1) / sqrt(x); } @@ -50,7 +50,7 @@ namespace detail template struct compute_inversesqrt { - GLM_FUNC_QUALIFIER static vec call(vec const & x) + GLM_FUNC_QUALIFIER static vec call(vec const& x) { vec tmp(x); vec xhalf(tmp * 0.5f); @@ -67,7 +67,7 @@ namespace detail // pow using std::pow; template - GLM_FUNC_QUALIFIER vec pow(vec const & base, vec const& exponent) + GLM_FUNC_QUALIFIER vec pow(vec const& base, vec const& exponent) { return detail::functor2::call(pow, base, exponent); } diff --git a/glm/detail/func_exponential_simd.inl b/glm/detail/func_exponential_simd.inl index d2195db5..1dd61f0f 100644 --- a/glm/detail/func_exponential_simd.inl +++ b/glm/detail/func_exponential_simd.inl @@ -11,7 +11,7 @@ namespace detail template 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) { vec<4, float, P> Result; Result.data = _mm_sqrt_ps(v.data); @@ -22,7 +22,7 @@ namespace detail template<> struct compute_sqrt<4, float, aligned_lowp, true> { - GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & v) + GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) { vec<4, float, aligned_lowp> Result; Result.data = glm_vec4_sqrt_lowp(v.data); diff --git a/glm/detail/func_geometric.hpp b/glm/detail/func_geometric.hpp index 8ea988e8..94c06d7b 100644 --- a/glm/detail/func_geometric.hpp +++ b/glm/detail/func_geometric.hpp @@ -45,7 +45,7 @@ namespace glm /// @see GLSL dot man page /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions template - GLM_FUNC_DECL T dot(vec const & x, vec const & y); + GLM_FUNC_DECL T dot(vec const& x, vec const& y); /// Returns the cross product of x and y. /// @@ -54,7 +54,7 @@ namespace glm /// @see GLSL cross man page /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions template - 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. /// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefined and generate an error. diff --git a/glm/detail/func_geometric_simd.inl b/glm/detail/func_geometric_simd.inl index 8e6026ac..218c73a7 100644 --- a/glm/detail/func_geometric_simd.inl +++ b/glm/detail/func_geometric_simd.inl @@ -11,7 +11,7 @@ namespace detail template 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) { return _mm_cvtss_f32(glm_vec4_length(v.data)); } @@ -20,7 +20,7 @@ namespace detail template 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) { return _mm_cvtss_f32(glm_vec4_distance(p0.data, p1.data)); } @@ -38,7 +38,7 @@ namespace detail template struct compute_cross { - 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) { __m128 const set0 = _mm_set_ps(0.0f, a.z, a.y, a.x); __m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x); @@ -53,7 +53,7 @@ namespace detail template 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) { vec<4, float, P> Result; Result.data = glm_vec4_normalize(v.data); diff --git a/glm/detail/func_integer.hpp b/glm/detail/func_integer.hpp index 3c9eaf87..10e4da75 100644 --- a/glm/detail/func_integer.hpp +++ b/glm/detail/func_integer.hpp @@ -32,8 +32,8 @@ namespace glm /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template GLM_FUNC_DECL vec uaddCarry( - vec const & x, - vec const & y, + vec const& x, + vec const& y, vec & carry); /// Subtracts the 32-bit unsigned integer y from x, returning @@ -46,8 +46,8 @@ namespace glm /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template GLM_FUNC_DECL vec usubBorrow( - vec const & x, - vec const & y, + vec const& x, + vec const& y, vec & borrow); /// Multiplies 32-bit integers x and y, producing a 64-bit @@ -60,8 +60,8 @@ namespace glm /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template GLM_FUNC_DECL void umulExtended( - vec const & x, - vec const & y, + vec const& x, + vec const& y, vec & msb, vec & lsb); @@ -75,8 +75,8 @@ namespace glm /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template GLM_FUNC_DECL void imulExtended( - vec const & x, - vec const & y, + vec const& x, + vec const& y, vec & msb, vec & lsb); @@ -134,7 +134,7 @@ namespace glm /// @see GLSL bitfieldReverse man page /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template - GLM_FUNC_DECL vec bitfieldReverse(vec const & v); + GLM_FUNC_DECL vec bitfieldReverse(vec const& v); /// Returns the number of bits set to 1 in the binary representation of value. /// @@ -153,7 +153,7 @@ namespace glm /// @see GLSL bitCount man page /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template - GLM_FUNC_DECL vec bitCount(vec const & v); + GLM_FUNC_DECL vec bitCount(vec const& v); /// Returns the bit number of the least significant bit set to /// 1 in the binary representation of value. @@ -176,7 +176,7 @@ namespace glm /// @see GLSL findLSB man page /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template - GLM_FUNC_DECL vec findLSB(vec const & v); + GLM_FUNC_DECL vec findLSB(vec const& v); /// Returns the bit number of the most significant bit in the binary representation of value. /// For positive integers, the result will be the bit number of the most significant bit set to 1. @@ -201,7 +201,7 @@ namespace glm /// @see GLSL findMSB man page /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions template - GLM_FUNC_DECL vec findMSB(vec const & v); + GLM_FUNC_DECL vec findMSB(vec const& v); /// @} }//namespace glm diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 3d462c89..6f6925bf 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -178,7 +178,7 @@ namespace detail }//namespace detail // uaddCarry - GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry) + GLM_FUNC_QUALIFIER uint uaddCarry(uint const& x, uint const& y, uint & Carry) { uint64 const Value64(static_cast(x) + static_cast(y)); uint64 const Max32((static_cast(1) << static_cast(32)) - static_cast(1)); @@ -196,7 +196,7 @@ namespace detail } // usubBorrow - GLM_FUNC_QUALIFIER uint usubBorrow(uint const & x, uint const & y, uint & Borrow) + GLM_FUNC_QUALIFIER uint usubBorrow(uint const& x, uint const& y, uint & Borrow) { GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch"); @@ -217,7 +217,7 @@ namespace detail } // umulExtended - GLM_FUNC_QUALIFIER void umulExtended(uint const & x, uint const & y, uint & msb, uint & lsb) + GLM_FUNC_QUALIFIER void umulExtended(uint const& x, uint const& y, uint & msb, uint & lsb) { GLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), "uint and uint32 size mismatch"); @@ -273,7 +273,7 @@ namespace detail // bitfieldInsert template - GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const & Base, genIUType const & Insert, int Offset, int Bits) + GLM_FUNC_QUALIFIER genIUType bitfieldInsert(genIUType const& Base, genIUType const& Insert, int Offset, int Bits) { return bitfieldInsert(vec<1, genIUType>(Base), vec<1, genIUType>(Insert), Offset, Bits).x; } diff --git a/glm/detail/func_matrix.hpp b/glm/detail/func_matrix.hpp index c3ee1b0d..f2fd1b1a 100644 --- a/glm/detail/func_matrix.hpp +++ b/glm/detail/func_matrix.hpp @@ -101,7 +101,7 @@ namespace detail /// @see GLSL matrixCompMult man page /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions template class matType> - GLM_FUNC_DECL matType matrixCompMult(matType const & x, matType const & y); + GLM_FUNC_DECL matType matrixCompMult(matType const& x, matType const& y); /// Treats the first parameter c as a column vector /// and the second parameter r as a row vector @@ -110,7 +110,7 @@ namespace detail /// @see GLSL outerProduct man page /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions template - GLM_FUNC_DECL typename detail::outerProduct_trait::type outerProduct(vec const & c, vec const & r); + GLM_FUNC_DECL typename detail::outerProduct_trait::type outerProduct(vec const& c, vec const& r); /// Returns the transposed matrix of x /// @@ -119,7 +119,7 @@ namespace detail /// @see GLSL transpose man page /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions template class matType> - GLM_FUNC_DECL typename matType::transpose_type transpose(matType const & x); + GLM_FUNC_DECL typename matType::transpose_type transpose(matType const& x); /// Return the determinant of a squared matrix. /// @@ -128,7 +128,7 @@ namespace detail /// @see GLSL determinant man page /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions template class matType> - GLM_FUNC_DECL T determinant(matType const & m); + GLM_FUNC_DECL T determinant(matType const& m); /// Return the inverse of a squared matrix. /// @@ -137,7 +137,7 @@ namespace detail /// @see GLSL inverse man page /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions template class matType> - GLM_FUNC_DECL matType inverse(matType const & m); + GLM_FUNC_DECL matType inverse(matType const& m); /// @} }//namespace glm diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index d99ad871..d607a982 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -356,14 +356,14 @@ namespace detail }//namespace detail template class matType> - GLM_FUNC_QUALIFIER matType matrixCompMult(matType const & x, matType const & y) + GLM_FUNC_QUALIFIER matType matrixCompMult(matType const& x, matType const& y) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'matrixCompMult' only accept floating-point inputs"); return detail::compute_matrixCompMult::value>::call(x, y); } template - GLM_FUNC_QUALIFIER typename detail::outerProduct_trait::type outerProduct(vec const & c, vec const & r) + GLM_FUNC_QUALIFIER typename detail::outerProduct_trait::type outerProduct(vec const& c, vec const& r) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'outerProduct' only accept floating-point inputs"); @@ -374,21 +374,21 @@ namespace detail } template class matType> - GLM_FUNC_QUALIFIER typename matType::transpose_type transpose(matType const & m) + GLM_FUNC_QUALIFIER typename matType::transpose_type transpose(matType const& m) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'transpose' only accept floating-point inputs"); return detail::compute_transpose::value>::call(m); } template class matType> - GLM_FUNC_QUALIFIER T determinant(matType const & m) + GLM_FUNC_QUALIFIER T determinant(matType const& m) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'determinant' only accept floating-point inputs"); return detail::compute_determinant::value>::call(m); } template class matType> - GLM_FUNC_QUALIFIER matType inverse(matType const & m) + GLM_FUNC_QUALIFIER matType inverse(matType const& m) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_UNRESTRICTED_GENTYPE, "'inverse' only accept floating-point inputs"); return detail::compute_inverse::value>::call(m); diff --git a/glm/detail/func_matrix_simd.inl b/glm/detail/func_matrix_simd.inl index 48455e90..42026033 100644 --- a/glm/detail/func_matrix_simd.inl +++ b/glm/detail/func_matrix_simd.inl @@ -16,7 +16,7 @@ namespace detail { GLM_STATIC_ASSERT(detail::is_aligned

::value, "Specialization requires aligned"); - GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const & x, mat<4, 4, float, P> const & y) + GLM_FUNC_QUALIFIER static mat<4, 4, float, P> call(mat<4, 4, float, P> const& x, mat<4, 4, float, P> const& y) { mat<4, 4, float, P> Result; glm_mat4_matrixCompMult( @@ -30,7 +30,7 @@ namespace detail template struct compute_transpose { - 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) { mat<4, 4, float, P> Result; glm_mat4_transpose( diff --git a/glm/detail/func_packing.hpp b/glm/detail/func_packing.hpp index e623b557..55e63049 100644 --- a/glm/detail/func_packing.hpp +++ b/glm/detail/func_packing.hpp @@ -30,7 +30,7 @@ namespace glm /// /// @see GLSL packUnorm2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint packUnorm2x16(vec2 const & v); + GLM_FUNC_DECL uint packUnorm2x16(vec2 const& v); /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// Then, the results are packed into the returned 32-bit unsigned integer. @@ -43,7 +43,7 @@ namespace glm /// /// @see GLSL packSnorm2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint packSnorm2x16(vec2 const & v); + GLM_FUNC_DECL uint packSnorm2x16(vec2 const& v); /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// Then, the results are packed into the returned 32-bit unsigned integer. @@ -56,7 +56,7 @@ namespace glm /// /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint packUnorm4x8(vec4 const & v); + GLM_FUNC_DECL uint packUnorm4x8(vec4 const& v); /// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. /// Then, the results are packed into the returned 32-bit unsigned integer. @@ -69,7 +69,7 @@ namespace glm /// /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint packSnorm4x8(vec4 const & v); + GLM_FUNC_DECL uint packSnorm4x8(vec4 const& v); /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. @@ -131,7 +131,7 @@ namespace glm /// /// @see GLSL packDouble2x32 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL double packDouble2x32(uvec2 const & v); + GLM_FUNC_DECL double packDouble2x32(uvec2 const& v); /// Returns a two-component unsigned integer vector representation of v. /// The bit-level representation of v is preserved. @@ -150,7 +150,7 @@ namespace glm /// /// @see GLSL packHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint packHalf2x16(vec2 const & v); + GLM_FUNC_DECL uint packHalf2x16(vec2 const& v); /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, diff --git a/glm/detail/func_packing.inl b/glm/detail/func_packing.inl index 505c80a1..58eb906f 100644 --- a/glm/detail/func_packing.inl +++ b/glm/detail/func_packing.inl @@ -7,7 +7,7 @@ namespace glm { - GLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v) + GLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const& v) { union { @@ -36,7 +36,7 @@ namespace glm return vec2(u.out[0], u.out[1]) * 1.5259021896696421759365224689097e-5f; } - GLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v) + GLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const& v) { union { @@ -65,7 +65,7 @@ namespace glm return clamp(vec2(u.out[0], u.out[1]) * 3.0518509475997192297128208258309e-5f, -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v) + GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const& v) { union { @@ -96,7 +96,7 @@ namespace glm return vec4(u.out[0], u.out[1], u.out[2], u.out[3]) * 0.0039215686274509803921568627451f; } - GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v) + GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const& v) { union { @@ -127,7 +127,7 @@ namespace glm return clamp(vec4(u.out[0], u.out[1], u.out[2], u.out[3]) * 0.0078740157480315f, -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER double packDouble2x32(uvec2 const & v) + GLM_FUNC_QUALIFIER double packDouble2x32(uvec2 const& v) { union { @@ -154,7 +154,7 @@ namespace glm return uvec2(u.out[0], u.out[1]); } - GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v) + GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const& v) { union { diff --git a/glm/detail/type_gentype.hpp b/glm/detail/type_gentype.hpp index ac9fc019..a0730aad 100644 --- a/glm/detail/type_gentype.hpp +++ b/glm/detail/type_gentype.hpp @@ -42,8 +42,8 @@ namespace detail typedef TYPE const * const const_pointer_const; typedef TYPE * const pointer_const; typedef TYPE & reference; - typedef TYPE const & const_reference; - typedef TYPE const & param_type; + typedef TYPE const& const_reference; + typedef TYPE const& param_type; ////////////////////////////////////// // Address (Implementation details) @@ -104,33 +104,33 @@ namespace detail ////////////////////////////////////// // Constructors base(); - base(class_type const & m); + base(class_type const& m); - explicit base(T const & x); + explicit base(T const& x); explicit base(value_type const * const x); explicit base(col_type const * const x); ////////////////////////////////////// // Conversions template - explicit base(base const & m); + explicit base(base const& m); ////////////////////////////////////// // Accesses col_type& operator[](size_type i); - col_type const & operator[](size_type i) const; + col_type const& operator[](size_type i) const; ////////////////////////////////////// // Unary updatable operators - class_type& operator= (class_type const & x); - class_type& operator+= (T const & x); - class_type& operator+= (class_type const & x); - class_type& operator-= (T const & x); - class_type& operator-= (class_type const & x); - class_type& operator*= (T const & x); - class_type& operator*= (class_type const & x); - class_type& operator/= (T const & x); - class_type& operator/= (class_type const & x); + class_type& operator= (class_type const& x); + class_type& operator+= (T const& x); + class_type& operator+= (class_type const& x); + class_type& operator-= (T const& x); + class_type& operator-= (class_type const& x); + class_type& operator*= (T const& x); + class_type& operator*= (class_type const& x); + class_type& operator/= (T const& x); + class_type& operator/= (class_type const& x); class_type& operator++ (); class_type& operator-- (); }; diff --git a/glm/detail/type_gentype.inl b/glm/detail/type_gentype.inl index 384f725f..8b76249f 100644 --- a/glm/detail/type_gentype.inl +++ b/glm/detail/type_gentype.inl @@ -55,7 +55,7 @@ base::base() template base::base ( - typename base::class_type const & m + typename base::class_type const& m ) { for @@ -72,7 +72,7 @@ base::base template base::base ( - typename base::T const & x + typename base::T const& x ) { if(rT == 1) // vector @@ -135,7 +135,7 @@ template template base::base ( - base const & m + base const& m ) { for @@ -162,7 +162,7 @@ typename base::col_type& base::operator[] } template -typename base::col_type const & base::operator[] +typename base::col_type const& base::operator[] ( typename base::size_type i ) const @@ -176,7 +176,7 @@ typename base::col_type const & base::operator[] template typename base::class_type& base::operator= ( - typename base::class_type const & x + typename base::class_type const& x ) { memcpy(&this->value, &x.value, cT * rT * sizeof(vT)); @@ -186,7 +186,7 @@ typename base::class_type& base::operator= template typename base::class_type& base::operator+= ( - typename base::T const & x + typename base::T const& x ) { typename base::size_type stop_col = x.col_size(); @@ -202,7 +202,7 @@ typename base::class_type& base::operator+= template typename base::class_type& base::operator+= ( - typename base::class_type const & x + typename base::class_type const& x ) { typename base::size_type stop_col = x.col_size(); @@ -218,7 +218,7 @@ typename base::class_type& base::operator+= template typename base::class_type& base::operator-= ( - typename base::T const & x + typename base::T const& x ) { typename base::size_type stop_col = x.col_size(); @@ -234,7 +234,7 @@ typename base::class_type& base::operator-= template typename base::class_type& base::operator-= ( - typename base::class_type const & x + typename base::class_type const& x ) { typename base::size_type stop_col = x.col_size(); @@ -250,7 +250,7 @@ typename base::class_type& base::operator-= template typename base::class_type& base::operator*= ( - typename base::T const & x + typename base::T const& x ) { typename base::size_type stop_col = x.col_size(); @@ -266,7 +266,7 @@ typename base::class_type& base::operator*= template typename base::class_type& base::operator*= ( - typename base::class_type const & x + typename base::class_type const& x ) { typename base::size_type stop_col = x.col_size(); @@ -282,7 +282,7 @@ typename base::class_type& base::operator*= template typename base::class_type& base::operator/= ( - typename base::T const & x + typename base::T const& x ) { typename base::size_type stop_col = x.col_size(); @@ -298,7 +298,7 @@ typename base::class_type& base::operator/= template typename base::class_type& base::operator/= ( - typename base::class_type const & x + typename base::class_type const& x ) { typename base::size_type stop_col = x.col_size(); diff --git a/glm/detail/type_half.hpp b/glm/detail/type_half.hpp index c3ef6176..57f7dec6 100644 --- a/glm/detail/type_half.hpp +++ b/glm/detail/type_half.hpp @@ -11,7 +11,7 @@ namespace detail typedef short hdata; GLM_FUNC_DECL float toFloat32(hdata value); - GLM_FUNC_DECL hdata toFloat16(float const & value); + GLM_FUNC_DECL hdata toFloat16(float const& value); }//namespace detail }//namespace glm diff --git a/glm/detail/type_mat.hpp b/glm/detail/type_mat.hpp index c07d1587..26a2feb7 100644 --- a/glm/detail/type_mat.hpp +++ b/glm/detail/type_mat.hpp @@ -25,7 +25,7 @@ namespace detail #endif//GLM_HAS_TEMPLATE_ALIASES template class matType> - GLM_FUNC_DECL matType inverse(matType const & m); + GLM_FUNC_DECL matType inverse(matType const& m); /// @addtogroup core_precision /// @{ diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index f366ddcd..60732dda 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -30,71 +30,71 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( - T const & x1, T const & y1, - T const & x2, T const & y2); + T const& x1, T const& y1, + T const& x2, T const& y2); GLM_FUNC_DECL mat( - col_type const & v1, - col_type const & v2); + col_type const& v1, + col_type const& v2); // -- Conversions -- template GLM_FUNC_DECL mat( - U const & x1, V const & y1, - M const & x2, N const & y2); + U const& x1, V const& y1, + M const& x2, N const& y2); template GLM_FUNC_DECL mat( - vec<2, U, P> const & v1, - vec<2, V, P> const & v2); + vec<2, U, P> const& v1, + vec<2, V, P> const& v2); // -- Matrix conversions -- template - 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<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, T, P> const & v) GLM_DEFAULT; + GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, T, P> const& v) GLM_DEFAULT; template - GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, U, P> const & m); + GLM_FUNC_DECL mat<2, 2, T, P> & operator=(mat<2, 2, U, P> const& m); template GLM_FUNC_DECL mat<2, 2, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<2, 2, T, P> & operator+=(mat<2, 2, U, P> const & m); + GLM_FUNC_DECL mat<2, 2, T, P> & operator+=(mat<2, 2, U, P> const& m); template GLM_FUNC_DECL mat<2, 2, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<2, 2, T, P> & operator-=(mat<2, 2, U, P> const & m); + GLM_FUNC_DECL mat<2, 2, T, P> & operator-=(mat<2, 2, U, P> const& m); template GLM_FUNC_DECL mat<2, 2, T, P> & operator*=(U s); template - GLM_FUNC_DECL mat<2, 2, T, P> & operator*=(mat<2, 2, U, P> const & m); + GLM_FUNC_DECL mat<2, 2, T, P> & operator*=(mat<2, 2, U, P> const& m); template GLM_FUNC_DECL mat<2, 2, T, P> & operator/=(U s); template - GLM_FUNC_DECL mat<2, 2, T, P> & operator/=(mat<2, 2, U, P> const & m); + GLM_FUNC_DECL mat<2, 2, T, P> & operator/=(mat<2, 2, U, P> const& m); // -- Increment and decrement operators -- @@ -107,74 +107,74 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index 5d119619..88a0c039 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -40,8 +40,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat ( - T const & x0, T const & y0, - T const & x1, T const & y1 + T const& x0, T const& y0, + T const& x1, T const& y1 ) { this->value[0] = col_type(x0, y0); @@ -61,8 +61,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 2, T, P>::mat ( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2 + X1 const& x1, Y1 const& y1, + X2 const& x2, Y2 const& y2 ) { this->value[0] = col_type(static_cast(x1), value_type(y1)); @@ -163,7 +163,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -173,7 +173,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -191,7 +191,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -209,7 +209,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -227,7 +227,7 @@ namespace glm template template - 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); } @@ -243,7 +243,7 @@ namespace glm template template - 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 *= inverse(m); } @@ -285,13 +285,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -301,7 +301,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -309,7 +309,7 @@ namespace glm } template - 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>( m[0] + scalar, @@ -317,7 +317,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -325,7 +325,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -333,7 +333,7 @@ namespace glm } template - 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>( scalar - m[0], @@ -341,7 +341,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -349,7 +349,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -357,7 +357,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -368,7 +368,7 @@ namespace glm 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 + typename mat<2, 2, T, P>::row_type const& v ) { return vec<2, T, P>( @@ -379,7 +379,7 @@ namespace glm template 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, mat<2, 2, T, P> const& m ) { @@ -389,7 +389,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -399,7 +399,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -411,7 +411,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -425,7 +425,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -433,7 +433,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -441,19 +441,19 @@ namespace glm } template - 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; } template - 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); } template - 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); return m1_copy /= m2; @@ -462,13 +462,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 5d8240c3..90217e0e 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -31,22 +31,22 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( T x0, T y0, T z0, T x1, T y1, T z1); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1); + col_type const& v0, + col_type const& v1); // -- Conversions -- @@ -57,37 +57,37 @@ namespace glm template GLM_FUNC_DECL mat( - vec<3, U, P> const & v1, - vec<3, V, P> const & v2); + vec<3, U, P> const& v1, + vec<3, V, P> const& v2); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, U, P> const & m); + GLM_FUNC_DECL mat<2, 3, T, P> & operator=(mat<2, 3, U, P> const& m); template GLM_FUNC_DECL mat<2, 3, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<2, 3, T, P> & operator+=(mat<2, 3, U, P> const & m); + GLM_FUNC_DECL mat<2, 3, T, P> & operator+=(mat<2, 3, U, P> const& m); template GLM_FUNC_DECL mat<2, 3, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<2, 3, T, P> & operator-=(mat<2, 3, U, P> const & m); + GLM_FUNC_DECL mat<2, 3, T, P> & operator-=(mat<2, 3, U, P> const& m); template GLM_FUNC_DECL mat<2, 3, T, P> & operator*=(U s); template @@ -104,59 +104,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index e554e04e..049f6866 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -22,7 +22,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -47,7 +47,7 @@ namespace glm } template - 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[1] = v1; @@ -71,7 +71,7 @@ namespace glm template template - 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) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -81,63 +81,63 @@ namespace glm template template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1], 0); } template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1], 0); } template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1], 0); } template - 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[1] = m[1]; @@ -153,7 +153,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -163,7 +163,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -173,7 +173,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -191,7 +191,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -209,7 +209,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -271,13 +271,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -287,7 +287,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -295,7 +295,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -303,7 +303,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -311,7 +311,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -319,7 +319,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -327,7 +327,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -338,7 +338,7 @@ namespace glm GLM_FUNC_QUALIFIER 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) + typename mat<2, 3, T, P>::row_type const& v) { return typename mat<2, 3, T, P>::col_type( m[0][0] * v.x + m[1][0] * v.y, @@ -349,7 +349,7 @@ namespace glm template 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, mat<2, 3, T, P> const& m) { return typename mat<2, 3, T, P>::row_type( @@ -358,7 +358,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -370,7 +370,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -400,7 +400,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -418,7 +418,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -426,7 +426,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -436,13 +436,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index c149a447..19460551 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -31,22 +31,22 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 2; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( T x0, T y0, T z0, T w0, T x1, T y1, T z1, T w1); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1); + col_type const& v0, + col_type const& v1); // -- Conversions -- @@ -59,37 +59,37 @@ namespace glm template GLM_FUNC_DECL mat( - vec<4, U, P> const & v1, - vec<4, V, P> const & v2); + vec<4, U, P> const& v1, + vec<4, V, P> const& v2); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, U, P> const & m); + GLM_FUNC_DECL mat<2, 4, T, P> & operator=(mat<2, 4, U, P> const& m); template GLM_FUNC_DECL mat<2, 4, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<2, 4, T, P> & operator+=(mat<2, 4, U, P> const & m); + GLM_FUNC_DECL mat<2, 4, T, P> & operator+=(mat<2, 4, U, P> const& m); template GLM_FUNC_DECL mat<2, 4, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<2, 4, T, P> & operator-=(mat<2, 4, U, P> const & m); + GLM_FUNC_DECL mat<2, 4, T, P> & operator-=(mat<2, 4, U, P> const& m); template GLM_FUNC_DECL mat<2, 4, T, P> & operator*=(U s); template @@ -106,59 +106,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 9c9a4e41..2ebbb88b 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -22,7 +22,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -48,7 +48,7 @@ namespace glm } template - 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[1] = v1; @@ -72,7 +72,7 @@ namespace glm template template - 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) { this->value[0] = col_type(v1); this->value[1] = col_type(v2); @@ -82,63 +82,63 @@ namespace glm template template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1], 0, 0); } template - 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[1] = col_type(m[1], 0); } template - 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[1] = col_type(m[1]); } template - 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[1] = col_type(m[1], 0); } template - 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[1] = col_type(m[1], 0, 0); } template - 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[1] = m[1]; } template - 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[1] = col_type(m[1], 0, 0); } template - 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[1] = col_type(m[1], 0); @@ -154,7 +154,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -164,7 +164,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -174,7 +174,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -192,7 +192,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -210,7 +210,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -272,13 +272,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -288,7 +288,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -296,7 +296,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -304,7 +304,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -312,7 +312,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -320,7 +320,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -328,7 +328,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -336,7 +336,7 @@ namespace glm } template - 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( m[0][0] * v.x + m[1][0] * v.y, @@ -346,7 +346,7 @@ namespace glm } template - 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( v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], @@ -354,7 +354,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -395,7 +395,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -409,7 +409,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], @@ -427,7 +427,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -435,7 +435,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -445,13 +445,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index b1b91bab..2cdfbb8e 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -31,14 +31,14 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( @@ -46,9 +46,9 @@ namespace glm T x1, T y1, T x2, T y2); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2); + col_type const& v0, + col_type const& v1, + col_type const& v2); // -- Conversions -- @@ -63,38 +63,38 @@ namespace glm template GLM_FUNC_DECL mat( - vec<2, V1, P> const & v1, - vec<2, V2, P> const & v2, - vec<2, V3, P> const & v3); + vec<2, V1, P> const& v1, + vec<2, V2, P> const& v2, + vec<2, V3, P> const& v3); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, U, P> const & m); + GLM_FUNC_DECL mat<3, 2, T, P> & operator=(mat<3, 2, U, P> const& m); template GLM_FUNC_DECL mat<3, 2, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<3, 2, T, P> & operator+=(mat<3, 2, U, P> const & m); + GLM_FUNC_DECL mat<3, 2, T, P> & operator+=(mat<3, 2, U, P> const& m); template GLM_FUNC_DECL mat<3, 2, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<3, 2, T, P> & operator-=(mat<3, 2, U, P> const & m); + GLM_FUNC_DECL mat<3, 2, T, P> & operator-=(mat<3, 2, U, P> const& m); template GLM_FUNC_DECL mat<3, 2, T, P> & operator*=(U s); template @@ -111,59 +111,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 015359bd..8a15a533 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -23,7 +23,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -54,9 +54,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2 + col_type const& v0, + col_type const& v1, + col_type const& v2 ) { this->value[0] = v0; @@ -87,9 +87,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 2, T, P>::mat ( - vec<2, V1, P> const & v1, - vec<2, V2, P> const & v2, - vec<2, V3, P> const & v3 + vec<2, V1, P> const& v1, + vec<2, V2, P> const& v2, + vec<2, V3, P> const& v3 ) { this->value[0] = col_type(v1); @@ -101,7 +101,7 @@ namespace glm template template - 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[1] = col_type(m[1]); @@ -109,7 +109,7 @@ namespace glm } template - 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[1] = m[1]; @@ -117,7 +117,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -125,7 +125,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -133,7 +133,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -141,7 +141,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -149,7 +149,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -157,7 +157,7 @@ namespace glm } template - 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[1] = m[1]; @@ -165,7 +165,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -182,7 +182,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -192,7 +192,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -203,7 +203,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -223,7 +223,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -243,7 +243,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -310,13 +310,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -327,7 +327,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -336,7 +336,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -345,7 +345,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -354,7 +354,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -363,7 +363,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -372,7 +372,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -381,7 +381,7 @@ namespace glm } template - 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( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, @@ -389,7 +389,7 @@ namespace glm } template - 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( v.x * m[0][0] + v.y * m[0][1], @@ -398,7 +398,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -423,7 +423,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -435,7 +435,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -449,7 +449,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -458,7 +458,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -469,13 +469,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index e5cac05b..a464fe8c 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -30,14 +30,14 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( @@ -45,9 +45,9 @@ namespace glm T x1, T y1, T z1, T x2, T y2, T z2); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2); + col_type const& v0, + col_type const& v1, + col_type const& v2); // -- Conversions -- @@ -62,46 +62,46 @@ namespace glm template GLM_FUNC_DECL mat( - vec<3, V1, P> const & v1, - vec<3, V2, P> const & v2, - vec<3, V3, P> const & v3); + vec<3, V1, P> const& v1, + vec<3, V2, P> const& v2, + vec<3, V3, P> const& v3); // -- Matrix conversions -- template - 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<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, U, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> & operator=(mat<3, 3, U, P> const& m); template GLM_FUNC_DECL mat<3, 3, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<3, 3, T, P> & operator+=(mat<3, 3, U, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> & operator+=(mat<3, 3, U, P> const& m); template GLM_FUNC_DECL mat<3, 3, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<3, 3, T, P> & operator-=(mat<3, 3, U, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> & operator-=(mat<3, 3, U, P> const& m); template GLM_FUNC_DECL mat<3, 3, T, P> & operator*=(U s); template - GLM_FUNC_DECL mat<3, 3, T, P> & operator*=(mat<3, 3, U, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> & operator*=(mat<3, 3, U, P> const& m); template GLM_FUNC_DECL mat<3, 3, T, P> & operator/=(U s); template - GLM_FUNC_DECL mat<3, 3, T, P> & operator/=(mat<3, 3, U, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> & operator/=(mat<3, 3, U, P> const& m); // -- Increment and decrement operators -- @@ -114,74 +114,74 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index 26737765..e21f6ffc 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -15,7 +15,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -25,7 +25,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -56,9 +56,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2 + col_type const& v0, + col_type const& v1, + col_type const& v2 ) { this->value[0] = v0; @@ -103,7 +103,7 @@ namespace glm template template - 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[1] = col_type(m[1]); @@ -111,7 +111,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -119,7 +119,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -127,7 +127,7 @@ namespace glm } template - 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[1] = m[1]; @@ -135,7 +135,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -143,7 +143,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -151,7 +151,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -159,7 +159,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -167,7 +167,7 @@ namespace glm } template - 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[1] = m[1]; @@ -184,7 +184,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -194,7 +194,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -205,7 +205,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -225,7 +225,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -245,7 +245,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -265,7 +265,7 @@ namespace glm template template - 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); } @@ -282,7 +282,7 @@ namespace glm template template - 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 *= inverse(m); } @@ -326,13 +326,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -343,7 +343,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -352,7 +352,7 @@ namespace glm } template - 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>( m[0] + scalar, @@ -361,7 +361,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -370,7 +370,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -379,7 +379,7 @@ namespace glm } template - 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>( scalar - m[0], @@ -388,7 +388,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -397,7 +397,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -406,7 +406,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -415,7 +415,7 @@ namespace glm } template - 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( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, @@ -424,7 +424,7 @@ namespace glm } template - 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( m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, @@ -433,7 +433,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -469,7 +469,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -481,7 +481,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -499,7 +499,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -508,7 +508,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -517,19 +517,19 @@ namespace glm } template - 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; } template - 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); } template - 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); return m1_copy /= m2; @@ -538,13 +538,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index 99cbf7f4..3eec6f56 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -31,14 +31,14 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 3; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( @@ -46,9 +46,9 @@ namespace glm T x1, T y1, T z1, T w1, T x2, T y2, T z2, T w2); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2); + col_type const& v0, + col_type const& v1, + col_type const& v2); // -- Conversions -- @@ -63,38 +63,38 @@ namespace glm template GLM_FUNC_DECL mat( - vec<4, V1, P> const & v1, - vec<4, V2, P> const & v2, - vec<4, V3, P> const & v3); + vec<4, V1, P> const& v1, + vec<4, V2, P> const& v2, + vec<4, V3, P> const& v3); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, U, P> const & m); + GLM_FUNC_DECL mat<3, 4, T, P> & operator=(mat<3, 4, U, P> const& m); template GLM_FUNC_DECL mat<3, 4, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<3, 4, T, P> & operator+=(mat<3, 4, U, P> const & m); + GLM_FUNC_DECL mat<3, 4, T, P> & operator+=(mat<3, 4, U, P> const& m); template GLM_FUNC_DECL mat<3, 4, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<3, 4, T, P> & operator-=(mat<3, 4, U, P> const & m); + GLM_FUNC_DECL mat<3, 4, T, P> & operator-=(mat<3, 4, U, P> const& m); template GLM_FUNC_DECL mat<3, 4, T, P> & operator*=(U s); template @@ -111,59 +111,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index f8c8de06..b4ec4aa6 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -23,7 +23,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -54,9 +54,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2 + col_type const& v0, + col_type const& v1, + col_type const& v2 ) { this->value[0] = v0; @@ -87,9 +87,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 4, T, P>::mat ( - vec<4, V1, P> const & v1, - vec<4, V2, P> const & v2, - vec<4, V3, P> const & v3 + vec<4, V1, P> const& v1, + vec<4, V2, P> const& v2, + vec<4, V3, P> const& v3 ) { this->value[0] = col_type(v1); @@ -101,7 +101,7 @@ namespace glm template template - 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[1] = col_type(m[1]); @@ -109,7 +109,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0, 0); @@ -117,7 +117,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -125,7 +125,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -133,7 +133,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -141,7 +141,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0, 0); @@ -149,7 +149,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -157,7 +157,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0, 0); @@ -165,7 +165,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -182,7 +182,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -192,7 +192,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -203,7 +203,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -223,7 +223,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -243,7 +243,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -310,13 +310,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -327,7 +327,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -336,7 +336,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -345,7 +345,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -354,7 +354,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -363,7 +363,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -372,7 +372,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -384,7 +384,7 @@ namespace glm GLM_FUNC_QUALIFIER 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 + typename mat<3, 4, T, P>::row_type const& v ) { return typename mat<3, 4, T, P>::col_type( @@ -397,7 +397,7 @@ namespace glm template 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, mat<3, 4, T, P> const& m ) { @@ -408,7 +408,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -457,7 +457,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -471,7 +471,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], @@ -489,7 +489,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -498,7 +498,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -509,13 +509,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index 88575dc0..d025d1ee 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -31,14 +31,14 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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 mat( @@ -47,10 +47,10 @@ namespace glm T x2, T y2, T x3, T y3); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3); // -- Conversions -- @@ -67,39 +67,39 @@ namespace glm template GLM_FUNC_DECL mat( - vec<2, V1, P> const & v1, - vec<2, V2, P> const & v2, - vec<2, V3, P> const & v3, - vec<2, V4, P> const & v4); + vec<2, V1, P> const& v1, + vec<2, V2, P> const& v2, + vec<2, V3, P> const& v3, + vec<2, V4, P> const& v4); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, U, P> const & m); + GLM_FUNC_DECL mat<4, 2, T, P> & operator=(mat<4, 2, U, P> const& m); template GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(mat<4, 2, U, P> const & m); + GLM_FUNC_DECL mat<4, 2, T, P> & operator+=(mat<4, 2, U, P> const& m); template GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(mat<4, 2, U, P> const & m); + GLM_FUNC_DECL mat<4, 2, T, P> & operator-=(mat<4, 2, U, P> const& m); template GLM_FUNC_DECL mat<4, 2, T, P> & operator*=(U s); template @@ -116,59 +116,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 9df56ed9..909c6292 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -24,7 +24,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -59,10 +59,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3 ) { this->value[0] = v0; @@ -97,10 +97,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 2, T, P>::mat ( - vec<2, V1, P> const & v1, - vec<2, V2, P> const & v2, - vec<2, V3, P> const & v3, - vec<2, V4, P> const & v4 + vec<2, V1, P> const& v1, + vec<2, V2, P> const& v2, + vec<2, V3, P> const& v3, + vec<2, V4, P> const& v4 ) { this->value[0] = col_type(v1); @@ -113,7 +113,7 @@ namespace glm template template - 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[1] = col_type(m[1]); @@ -122,7 +122,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -131,7 +131,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -140,7 +140,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -149,7 +149,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -158,7 +158,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -167,7 +167,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -176,7 +176,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -185,7 +185,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -203,7 +203,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -213,7 +213,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -225,7 +225,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -247,7 +247,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -269,7 +269,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -341,13 +341,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -359,7 +359,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + scalar, @@ -369,7 +369,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -379,7 +379,7 @@ namespace glm } template - 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>( m[0] - scalar, @@ -389,7 +389,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -399,7 +399,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -409,7 +409,7 @@ namespace glm } template - 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>( m[0] * scalar, @@ -419,7 +419,7 @@ namespace glm } template - 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( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, @@ -427,7 +427,7 @@ namespace glm } template - 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( v.x * m[0][0] + v.y * m[0][1], @@ -437,7 +437,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -466,7 +466,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -478,7 +478,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -492,7 +492,7 @@ namespace glm } template - 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>( m[0] / scalar, @@ -502,7 +502,7 @@ namespace glm } template - 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>( scalar / m[0], @@ -514,13 +514,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index 4bc530ba..ef7c443a 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -31,26 +31,26 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length() { return 4; } GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- 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 - 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); GLM_FUNC_DECL mat( - T const & x0, T const & y0, T const & z0, - T const & x1, T const & y1, T const & z1, - T const & x2, T const & y2, T const & z2, - T const & x3, T const & y3, T const & z3); + T const& x0, T const& y0, T const& z0, + T const& x1, T const& y1, T const& z1, + T const& x2, T const& y2, T const& z2, + T const& x3, T const& y3, T const& z3); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3); // -- Conversions -- @@ -60,46 +60,46 @@ namespace glm typename X3, typename Y3, typename Z3, typename X4, typename Y4, typename Z4> GLM_FUNC_DECL mat( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3, - X4 const & x4, Y4 const & y4, Z4 const & z4); + X1 const& x1, Y1 const& y1, Z1 const& z1, + X2 const& x2, Y2 const& y2, Z2 const& z2, + X3 const& x3, Y3 const& y3, Z3 const& z3, + X4 const& x4, Y4 const& y4, Z4 const& z4); template GLM_FUNC_DECL mat( - vec<3, V1, P> const & v1, - vec<3, V2, P> const & v2, - vec<3, V3, P> const & v3, - vec<3, V4, P> const & v4); + vec<3, V1, P> const& v1, + vec<3, V2, P> const& v2, + vec<3, V3, P> const& v3, + vec<3, V4, P> const& v4); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, U, P> const & m); + GLM_FUNC_DECL mat<4, 3, T, P> & operator=(mat<4, 3, U, P> const& m); template GLM_FUNC_DECL mat<4, 3, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<4, 3, T, P> & operator+=(mat<4, 3, U, P> const & m); + GLM_FUNC_DECL mat<4, 3, T, P> & operator+=(mat<4, 3, U, P> const& m); template GLM_FUNC_DECL mat<4, 3, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<4, 3, T, P> & operator-=(mat<4, 3, U, P> const & m); + GLM_FUNC_DECL mat<4, 3, T, P> & operator-=(mat<4, 3, U, P> const& m); template GLM_FUNC_DECL mat<4, 3, T, P> & operator*=(U s); template @@ -116,59 +116,59 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index a72d2675..cca80921 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m.value[1]; @@ -24,7 +24,7 @@ namespace glm template template - 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[1] = m.value[1]; @@ -33,7 +33,7 @@ namespace glm } template - 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[1] = col_type(0, s, 0); @@ -44,10 +44,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat ( - T const & x0, T const & y0, T const & z0, - T const & x1, T const & y1, T const & z1, - T const & x2, T const & y2, T const & z2, - T const & x3, T const & y3, T const & z3 + T const& x0, T const& y0, T const& z0, + T const& x1, T const& y1, T const& z1, + T const& x2, T const& y2, T const& z2, + T const& x3, T const& y3, T const& z3 ) { this->value[0] = col_type(x0, y0, z0); @@ -59,10 +59,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3 ) { this->value[0] = v0; @@ -81,10 +81,10 @@ namespace glm typename X4, typename Y4, typename Z4> GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat ( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3, - X4 const & x4, Y4 const & y4, Z4 const & z4 + X1 const& x1, Y1 const& y1, Z1 const& z1, + X2 const& x2, Y2 const& y2, Z2 const& z2, + X3 const& x3, Y3 const& y3, Z3 const& z3, + X4 const& x4, Y4 const& y4, Z4 const& z4 ) { this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1)); @@ -97,10 +97,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 3, T, P>::mat ( - vec<3, V1, P> const & v1, - vec<3, V2, P> const & v2, - vec<3, V3, P> const & v3, - vec<3, V4, P> const & v4 + vec<3, V1, P> const& v1, + vec<3, V2, P> const& v2, + vec<3, V3, P> const& v3, + vec<3, V4, P> const& v4 ) { this->value[0] = col_type(v1); @@ -113,7 +113,7 @@ namespace glm template template - 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[1] = col_type(m[1]); @@ -122,7 +122,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -131,7 +131,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -140,7 +140,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -149,7 +149,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -158,7 +158,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -167,7 +167,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -176,7 +176,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -185,7 +185,7 @@ namespace glm } template - 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[1] = col_type(m[1]); @@ -203,7 +203,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -213,7 +213,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -225,7 +225,7 @@ namespace glm template template - 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) { this->value[0] = m[0]; this->value[1] = m[1]; @@ -247,7 +247,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -269,7 +269,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -341,13 +341,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -m[0], @@ -359,7 +359,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + s, @@ -369,7 +369,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -379,7 +379,7 @@ namespace glm } template - 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>( m[0] - s, @@ -389,7 +389,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -399,7 +399,7 @@ namespace glm } template - 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>( m[0] * s, @@ -409,7 +409,7 @@ namespace glm } template - 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>( m[0] * s, @@ -422,7 +422,7 @@ namespace glm GLM_FUNC_QUALIFIER 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) + typename mat<4, 3, T, P>::row_type const& v) { return typename mat<4, 3, T, P>::col_type( m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, @@ -433,7 +433,7 @@ namespace glm template 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, mat<4, 3, T, P> const& m) { return typename mat<4, 3, T, P>::row_type( @@ -444,7 +444,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -456,7 +456,7 @@ namespace glm } template - 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 SrcA01 = m1[0][1]; @@ -498,7 +498,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -516,7 +516,7 @@ namespace glm } template - 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>( m[0] / s, @@ -526,7 +526,7 @@ namespace glm } template - 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>( s / m[0], @@ -538,13 +538,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index 04a8d7a3..f5a9afdd 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -30,7 +30,7 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;} GLM_FUNC_DECL col_type & operator[](length_type i); - GLM_FUNC_DECL col_type const & operator[](length_type i) const; + GLM_FUNC_DECL col_type const& operator[](length_type i) const; // -- Constructors -- @@ -39,17 +39,17 @@ namespace glm template 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); GLM_FUNC_DECL mat( - T const & x0, T const & y0, T const & z0, T const & w0, - T const & x1, T const & y1, T const & z1, T const & w1, - T const & x2, T const & y2, T const & z2, T const & w2, - T const & x3, T const & y3, T const & z3, T const & w3); + T const& x0, T const& y0, T const& z0, T const& w0, + T const& x1, T const& y1, T const& z1, T const& w1, + T const& x2, T const& y2, T const& z2, T const& w2, + T const& x3, T const& y3, T const& z3, T const& w3); GLM_FUNC_DECL mat( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3); // -- Conversions -- @@ -59,54 +59,54 @@ namespace glm typename X3, typename Y3, typename Z3, typename W3, typename X4, typename Y4, typename Z4, typename W4> GLM_FUNC_DECL mat( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, - X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); + X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1, + X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2, + X3 const& x3, Y3 const& y3, Z3 const& z3, W3 const& w3, + X4 const& x4, Y4 const& y4, Z4 const& z4, W4 const& w4); template GLM_FUNC_DECL mat( - vec<4, V1, P> const & v1, - vec<4, V2, P> const & v2, - vec<4, V3, P> const & v3, - vec<4, V4, P> const & v4); + vec<4, V1, P> const& v1, + vec<4, V2, P> const& v2, + vec<4, V3, P> const& v3, + vec<4, V4, P> const& v4); // -- Matrix conversions -- template - 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<3, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const & x); - GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const & x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 3, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<2, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 2, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<3, 4, T, P> const& x); + GLM_FUNC_DECL GLM_EXPLICIT mat(mat<4, 3, T, P> const& x); // -- Unary arithmetic operators -- - GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, T, P> const & m) GLM_DEFAULT; + GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, T, P> const& m) GLM_DEFAULT; template - GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, U, P> const & m); + GLM_FUNC_DECL mat<4, 4, T, P> & operator=(mat<4, 4, U, P> const& m); template GLM_FUNC_DECL mat<4, 4, T, P> & operator+=(U s); template - GLM_FUNC_DECL mat<4, 4, T, P> & operator+=(mat<4, 4, U, P> const & m); + GLM_FUNC_DECL mat<4, 4, T, P> & operator+=(mat<4, 4, U, P> const& m); template GLM_FUNC_DECL mat<4, 4, T, P> & operator-=(U s); template - GLM_FUNC_DECL mat<4, 4, T, P> & operator-=(mat<4, 4, U, P> const & m); + GLM_FUNC_DECL mat<4, 4, T, P> & operator-=(mat<4, 4, U, P> const& m); template GLM_FUNC_DECL mat<4, 4, T, P> & operator*=(U s); template - GLM_FUNC_DECL mat<4, 4, T, P> & operator*=(mat<4, 4, U, P> const & m); + GLM_FUNC_DECL mat<4, 4, T, P> & operator*=(mat<4, 4, U, P> const& m); template GLM_FUNC_DECL mat<4, 4, T, P> & operator/=(U s); template - GLM_FUNC_DECL mat<4, 4, T, P> & operator/=(mat<4, 4, U, P> const & m); + GLM_FUNC_DECL mat<4, 4, T, P> & operator/=(mat<4, 4, U, P> const& m); // -- Increment and decrement operators -- @@ -119,74 +119,74 @@ namespace glm // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index f665937e..eaa78d64 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -15,7 +15,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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[1] = m[1]; @@ -26,7 +26,7 @@ namespace glm template template - 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[1] = m[1]; @@ -35,7 +35,7 @@ namespace glm } template - 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[1] = col_type(0, s, 0, 0); @@ -46,10 +46,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat ( - T const & x0, T const & y0, T const & z0, T const & w0, - T const & x1, T const & y1, T const & z1, T const & w1, - T const & x2, T const & y2, T const & z2, T const & w2, - T const & x3, T const & y3, T const & z3, T const & w3 + T const& x0, T const& y0, T const& z0, T const& w0, + T const& x1, T const& y1, T const& z1, T const& w1, + T const& x2, T const& y2, T const& z2, T const& w2, + T const& x3, T const& y3, T const& z3, T const& w3 ) { this->value[0] = col_type(x0, y0, z0, w0); @@ -61,10 +61,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 + col_type const& v0, + col_type const& v1, + col_type const& v2, + col_type const& v3 ) { this->value[0] = v0; @@ -77,7 +77,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat ( - mat<4, 4, U, Q> const & m + mat<4, 4, U, Q> const& m ) { this->value[0] = col_type(m[0]); @@ -96,10 +96,10 @@ namespace glm typename X4, typename Y4, typename Z4, typename W4> GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat ( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, - X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 + X1 const& x1, Y1 const& y1, Z1 const& z1, W1 const& w1, + X2 const& x2, Y2 const& y2, Z2 const& z2, W2 const& w2, + X3 const& x3, Y3 const& y3, Z3 const& z3, W3 const& w3, + X4 const& x4, Y4 const& y4, Z4 const& z4, W4 const& w4 ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); @@ -132,10 +132,10 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P>::mat ( - vec<4, V1, P> const & v1, - vec<4, V2, P> const & v2, - vec<4, V3, P> const & v3, - vec<4, V4, P> const & v4 + vec<4, V1, P> const& v1, + vec<4, V2, P> const& v2, + vec<4, V3, P> const& v3, + vec<4, V4, P> const& v4 ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer || GLM_UNRESTRICTED_GENTYPE, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); @@ -152,7 +152,7 @@ namespace glm // -- Matrix conversions -- template - 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[1] = col_type(m[1], 0, 0); @@ -161,7 +161,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -170,7 +170,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -179,7 +179,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0, 0); @@ -188,7 +188,7 @@ namespace glm } template - 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[1] = m[1]; @@ -197,7 +197,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0, 0); @@ -206,7 +206,7 @@ namespace glm } template - 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[1] = m[1]; @@ -215,7 +215,7 @@ namespace glm } template - 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[1] = col_type(m[1], 0); @@ -233,7 +233,7 @@ namespace glm } template - 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()); return this->value[i]; @@ -243,7 +243,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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(&this->value, &m.value, 16 * sizeof(valType)); @@ -257,7 +257,7 @@ namespace glm template template - 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) { //memcpy could be faster //memcpy(&this->value, &m.value, 16 * sizeof(valType)); @@ -281,7 +281,7 @@ namespace glm template template - 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) { this->value[0] += m[0]; this->value[1] += m[1]; @@ -303,7 +303,7 @@ namespace glm template template - 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) { this->value[0] -= m[0]; this->value[1] -= m[1]; @@ -325,7 +325,7 @@ namespace glm template template - 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); } @@ -343,7 +343,7 @@ namespace glm template template - 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 *= inverse(m); } @@ -389,13 +389,13 @@ namespace glm // -- Unary constant operators -- template - 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; } template - 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>( -m[0], @@ -407,7 +407,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( m[0] + s, @@ -417,7 +417,7 @@ namespace glm } template - 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>( m[0] + s, @@ -427,7 +427,7 @@ namespace glm } template - 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>( m1[0] + m2[0], @@ -437,7 +437,7 @@ namespace glm } template - 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>( m[0] - s, @@ -447,7 +447,7 @@ namespace glm } template - 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>( s - m[0], @@ -457,7 +457,7 @@ namespace glm } template - 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>( m1[0] - m2[0], @@ -467,7 +467,7 @@ namespace glm } template - 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>( m[0] * s, @@ -477,7 +477,7 @@ namespace glm } template - 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>( m[0] * s, @@ -490,7 +490,7 @@ namespace glm 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 + typename mat<4, 4, T, P>::row_type const& v ) { /* @@ -537,7 +537,7 @@ namespace glm template 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, mat<4, 4, T, P> const& m ) { @@ -549,7 +549,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -563,7 +563,7 @@ namespace glm } template - 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>( m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], @@ -581,7 +581,7 @@ namespace glm } template - 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 SrcA1 = m1[1]; @@ -602,7 +602,7 @@ namespace glm } template - 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>( m[0] / s, @@ -612,7 +612,7 @@ namespace glm } template - 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>( s / m[0], @@ -622,19 +622,19 @@ namespace glm } template - 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; } template - 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); } template - 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); return m1_copy /= m2; @@ -643,13 +643,13 @@ namespace glm // -- Boolean operators -- template - 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]); } template - 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]); } diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 328264b3..885827d7 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -81,7 +81,7 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 1;} GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; + GLM_FUNC_DECL T const& operator[](length_type i) const; // -- Implicit basic constructors -- @@ -114,7 +114,7 @@ namespace glm /* # if(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)) template - GLM_FUNC_DECL tvec(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const & that) + GLM_FUNC_DECL tvec(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const& that) { *this = that(); } @@ -122,7 +122,7 @@ namespace glm */ // -- Unary arithmetic operators -- - GLM_FUNC_DECL vec & operator=(vec const & v) GLM_DEFAULT; + GLM_FUNC_DECL vec & operator=(vec const& v) GLM_DEFAULT; template GLM_FUNC_DECL vec & operator=(vec<1, U, P> const& v); @@ -198,102 +198,102 @@ namespace glm GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v1, vec<1, T, P> const& v2); template - 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 GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const& v); template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 84a5e674..15de613b 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -13,7 +13,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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) {} # endif//!GLM_HAS_DEFAULTED_FUNCTIONS @@ -35,25 +35,25 @@ namespace glm template template - 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(v.x)) {} template template - 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(v.x)) {} template template - 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(v.x)) {} template template - 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(v.x)) {} @@ -67,7 +67,7 @@ namespace glm } template - 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()); return (&x)[i]; @@ -77,7 +77,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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; return *this; @@ -86,7 +86,7 @@ namespace glm template template - 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) { this->x = static_cast(v.x); return *this; @@ -102,7 +102,7 @@ namespace glm template template - 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) { this->x += static_cast(v.x); return *this; @@ -118,7 +118,7 @@ namespace glm template template - 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) { this->x -= static_cast(v.x); return *this; @@ -134,7 +134,7 @@ namespace glm template template - 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) { this->x *= static_cast(v.x); return *this; @@ -150,7 +150,7 @@ namespace glm template template - 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) { this->x /= static_cast(v.x); return *this; @@ -200,7 +200,7 @@ namespace glm template template - 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) { this->x %= static_cast(v.x); return *this; @@ -216,7 +216,7 @@ namespace glm template template - 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) { this->x &= static_cast(v.x); return *this; @@ -232,7 +232,7 @@ namespace glm template template - 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) { this->x |= U(v.x); return *this; @@ -248,7 +248,7 @@ namespace glm template template - 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) { this->x ^= static_cast(v.x); return *this; @@ -264,7 +264,7 @@ namespace glm template template - 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) { this->x <<= static_cast(v.x); return *this; @@ -280,7 +280,7 @@ namespace glm template template - 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) { this->x >>= static_cast(v.x); return *this; @@ -289,13 +289,13 @@ namespace glm // -- Unary constant operators -- template - 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; } template - 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>( -v.x); @@ -304,21 +304,21 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( v.x + scalar); } template - 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>( scalar + v.x); } template - 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>( v1.x + v2.x); @@ -326,63 +326,63 @@ namespace glm //operator- template - 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>( v.x - scalar); } template - 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>( scalar - v.x); } template - 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>( v1.x - v2.x); } template - 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>( v.x * scalar); } template - 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>( scalar * v.x); } template - 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>( v1.x * v2.x); } template - 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>( v.x / scalar); } template - 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>( scalar / v.x); } template - 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>( v1.x / v2.x); @@ -391,133 +391,133 @@ namespace glm // -- Binary bit operators -- template - 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>( v.x % scalar); } template - 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>( scalar % v.x); } template - 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>( v1.x % v2.x); } template - 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>( v.x & scalar); } template - 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>( scalar & v.x); } template - 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>( v1.x & v2.x); } template - 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>( v.x | scalar); } template - 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>( scalar | v.x); } template - 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>( v1.x | v2.x); } template - 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>( v.x ^ scalar); } template - 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>( scalar ^ v.x); } template - 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>( v1.x ^ v2.x); } template - 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>( static_cast(v.x << scalar)); } template - 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>( scalar << v.x); } template - 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>( v1.x << v2.x); } template - 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>( v.x >> scalar); } template - 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>( scalar >> v.x); } template - 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>( v1.x >> v2.x); } template - 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>( ~v.x); @@ -526,25 +526,25 @@ namespace glm // -- Boolean operators -- template - 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::call(v1.x, v2.x); } template - 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); } template - 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); } template - 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); } diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index fa6597d1..c1cfc102 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -128,7 +128,7 @@ namespace glm // -- Unary arithmetic operators -- - GLM_FUNC_DECL vec& operator=(vec const & v) GLM_DEFAULT; + GLM_FUNC_DECL vec& operator=(vec const& v) GLM_DEFAULT; template GLM_FUNC_DECL vec& operator=(vec<2, U, P> const& v); @@ -169,217 +169,217 @@ namespace glm template GLM_FUNC_DECL vec & operator%=(U scalar); template - GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator%=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator%=(vec<2, U, P> const& v); template GLM_FUNC_DECL vec & operator&=(U scalar); template - GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator&=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator&=(vec<2, U, P> const& v); template GLM_FUNC_DECL vec & operator|=(U scalar); template - GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator|=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator|=(vec<2, U, P> const& v); template GLM_FUNC_DECL vec & operator^=(U scalar); template - GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator^=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator^=(vec<2, U, P> const& v); template GLM_FUNC_DECL vec & operator<<=(U scalar); template - GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator<<=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator<<=(vec<2, U, P> const& v); template GLM_FUNC_DECL vec & operator>>=(U scalar); template - GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator>>=(vec<2, U, P> const & v); + GLM_FUNC_DECL vec & operator>>=(vec<2, U, P> const& v); }; // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index cd31d564..1c90eec3 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -85,7 +85,7 @@ namespace glm } template - 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()); return (&x)[i]; @@ -469,7 +469,7 @@ namespace glm } template - 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>( v1.x + v2.x, @@ -477,7 +477,7 @@ namespace glm } template - 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>( v.x - scalar, @@ -485,7 +485,7 @@ namespace glm } template - 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>( v1.x - v2.x, @@ -493,7 +493,7 @@ namespace glm } template - 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>( scalar - v.x, @@ -501,7 +501,7 @@ namespace glm } template - 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>( v1.x - v2.x, @@ -509,7 +509,7 @@ namespace glm } template - 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>( v1.x - v2.x, @@ -517,7 +517,7 @@ namespace glm } template - 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>( v.x * scalar, @@ -525,7 +525,7 @@ namespace glm } template - 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>( v1.x * v2.x, @@ -533,7 +533,7 @@ namespace glm } template - 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>( scalar * v.x, @@ -541,7 +541,7 @@ namespace glm } template - 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>( v1.x * v2.x, @@ -549,7 +549,7 @@ namespace glm } template - 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>( v1.x * v2.x, @@ -557,7 +557,7 @@ namespace glm } template - 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>( v.x / scalar, @@ -565,7 +565,7 @@ namespace glm } template - 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>( v1.x / v2.x, @@ -573,7 +573,7 @@ namespace glm } template - 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>( scalar / v.x, @@ -581,7 +581,7 @@ namespace glm } template - 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>( v1.x / v2.x, @@ -589,7 +589,7 @@ namespace glm } template - 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>( v1.x / v2.x, @@ -599,7 +599,7 @@ namespace glm // -- Binary bit operators -- template - 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>( v.x % scalar, @@ -607,7 +607,7 @@ namespace glm } template - 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>( v1.x % v2.x, @@ -615,7 +615,7 @@ namespace glm } template - 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>( scalar % v.x, @@ -623,7 +623,7 @@ namespace glm } template - 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>( v1.x % v2.x, @@ -631,7 +631,7 @@ namespace glm } template - 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>( v1.x % v2.x, @@ -639,7 +639,7 @@ namespace glm } template - 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>( v.x & scalar, @@ -647,7 +647,7 @@ namespace glm } template - 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>( v1.x & v2.x, @@ -655,7 +655,7 @@ namespace glm } template - 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>( scalar & v.x, @@ -663,7 +663,7 @@ namespace glm } template - 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>( v1.x & v2.x, @@ -671,7 +671,7 @@ namespace glm } template - 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>( v1.x & v2.x, @@ -679,7 +679,7 @@ namespace glm } template - 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>( v.x | scalar, @@ -687,7 +687,7 @@ namespace glm } template - 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>( v1.x | v2.x, @@ -695,7 +695,7 @@ namespace glm } template - 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>( scalar | v.x, @@ -703,7 +703,7 @@ namespace glm } template - 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>( v1.x | v2.x, @@ -711,7 +711,7 @@ namespace glm } template - 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>( v1.x | v2.x, @@ -719,7 +719,7 @@ namespace glm } template - 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>( v.x ^ scalar, @@ -727,7 +727,7 @@ namespace glm } template - 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>( v1.x ^ v2.x, @@ -735,7 +735,7 @@ namespace glm } template - 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>( scalar ^ v.x, @@ -743,7 +743,7 @@ namespace glm } template - 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>( v1.x ^ v2.x, @@ -751,7 +751,7 @@ namespace glm } template - 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>( v1.x ^ v2.x, @@ -759,7 +759,7 @@ namespace glm } template - 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>( v.x << scalar, @@ -767,7 +767,7 @@ namespace glm } template - 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>( v1.x << v2.x, @@ -775,7 +775,7 @@ namespace glm } template - 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>( scalar << v.x, @@ -783,7 +783,7 @@ namespace glm } template - 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>( v1.x << v2.x, @@ -791,7 +791,7 @@ namespace glm } template - 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>( v1.x << v2.x, @@ -799,7 +799,7 @@ namespace glm } template - 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>( v.x >> scalar, @@ -807,7 +807,7 @@ namespace glm } template - 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>( v1.x >> v2.x, @@ -815,7 +815,7 @@ namespace glm } template - 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>( scalar >> v.x, @@ -823,7 +823,7 @@ namespace glm } template - 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>( v1.x >> v2.x, @@ -831,7 +831,7 @@ namespace glm } template - 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>( v1.x >> v2.x, @@ -839,7 +839,7 @@ namespace glm } template - 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>( ~v.x, @@ -849,7 +849,7 @@ namespace glm // -- Boolean operators -- template - 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 detail::compute_equal::call(v1.x, v2.x) && @@ -857,19 +857,19 @@ namespace glm } template - 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); } template - 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); } template - 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); } diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 5d1e1d8d..458eca1c 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -82,14 +82,14 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 3;} GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; + GLM_FUNC_DECL T const& operator[](length_type i) const; // -- Implicit basic constructors -- 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 - 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 -- @@ -129,19 +129,19 @@ namespace glm // -- Swizzle constructors -- # if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template - GLM_FUNC_DECL vec(detail::_swizzle<3, T, P, E0, E1, E2, -1> const & that) + GLM_FUNC_DECL vec(detail::_swizzle<3, T, P, E0, E1, E2, -1> const& that) { *this = that(); } template - GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v, T const & scalar) + GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v, T const& scalar) { *this = vec(v(), scalar); } template - GLM_FUNC_DECL vec(T const & scalar, detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v) + GLM_FUNC_DECL vec(T const& scalar, detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v) { *this = vec(scalar, v()); } @@ -149,34 +149,34 @@ namespace glm // -- Unary arithmetic operators -- - GLM_FUNC_DECL vec & operator=(vec const & v) GLM_DEFAULT; + GLM_FUNC_DECL vec & operator=(vec const& v) GLM_DEFAULT; template - GLM_FUNC_DECL vec & operator=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator+=(U scalar); template - GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator+=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator+=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator-=(U scalar); template - GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator-=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator-=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator*=(U scalar); template - GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator*=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator*=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator/=(U scalar); template - GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator/=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator/=(vec<3, U, P> const& v); // -- Increment and decrement operators -- @@ -190,217 +190,217 @@ namespace glm template GLM_FUNC_DECL vec & operator%=(U scalar); template - GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator%=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator%=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator&=(U scalar); template - GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator&=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator&=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator|=(U scalar); template - GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator|=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator|=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator^=(U scalar); template - GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator^=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator^=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator<<=(U scalar); template - GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator<<=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator<<=(vec<3, U, P> const& v); template GLM_FUNC_DECL vec & operator>>=(U scalar); template - GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec & operator>>=(vec<3, U, P> const & v); + GLM_FUNC_DECL vec & operator>>=(vec<3, U, P> const& v); }; // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index 3348e496..4071fc87 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -13,14 +13,14 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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) {} # endif//!GLM_HAS_DEFAULTED_FUNCTIONS template template - 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) {} @@ -114,7 +114,7 @@ namespace glm } template - 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()); return (&x)[i]; @@ -124,7 +124,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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->y = v.y; @@ -135,7 +135,7 @@ namespace glm template template - 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) { this->x = static_cast(v.x); this->y = static_cast(v.y); @@ -155,7 +155,7 @@ namespace glm template template - 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) { this->x += static_cast(v.x); this->y += static_cast(v.x); @@ -165,7 +165,7 @@ namespace glm template template - 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) { this->x += static_cast(v.x); this->y += static_cast(v.y); @@ -185,7 +185,7 @@ namespace glm template template - 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) { this->x -= static_cast(v.x); this->y -= static_cast(v.x); @@ -195,7 +195,7 @@ namespace glm template template - 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) { this->x -= static_cast(v.x); this->y -= static_cast(v.y); @@ -215,7 +215,7 @@ namespace glm template template - 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) { this->x *= static_cast(v.x); this->y *= static_cast(v.x); @@ -225,7 +225,7 @@ namespace glm template template - 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) { this->x *= static_cast(v.x); this->y *= static_cast(v.y); @@ -245,7 +245,7 @@ namespace glm template template - 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) { this->x /= static_cast(v.x); this->y /= static_cast(v.x); @@ -255,7 +255,7 @@ namespace glm template template - 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) { this->x /= static_cast(v.x); this->y /= static_cast(v.y); @@ -313,7 +313,7 @@ namespace glm template template - 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) { this->x %= v.x; this->y %= v.x; @@ -323,7 +323,7 @@ namespace glm template template - 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) { this->x %= v.x; this->y %= v.y; @@ -343,7 +343,7 @@ namespace glm template template - 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) { this->x &= v.x; this->y &= v.x; @@ -353,7 +353,7 @@ namespace glm template template - 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) { this->x &= v.x; this->y &= v.y; @@ -373,7 +373,7 @@ namespace glm template template - 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) { this->x |= v.x; this->y |= v.x; @@ -383,7 +383,7 @@ namespace glm template template - 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) { this->x |= v.x; this->y |= v.y; @@ -403,7 +403,7 @@ namespace glm template template - 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) { this->x ^= v.x; this->y ^= v.x; @@ -413,7 +413,7 @@ namespace glm template template - 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) { this->x ^= v.x; this->y ^= v.y; @@ -433,7 +433,7 @@ namespace glm template template - 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) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.x); @@ -443,7 +443,7 @@ namespace glm template template - 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) { this->x <<= static_cast(v.x); this->y <<= static_cast(v.y); @@ -463,7 +463,7 @@ namespace glm template template - 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) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.x); @@ -473,7 +473,7 @@ namespace glm template template - 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) { this->x >>= static_cast(v.x); this->y >>= static_cast(v.y); @@ -484,13 +484,13 @@ namespace glm // -- Unary arithmetic operators -- template - 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; } template - 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>( -v.x, @@ -501,7 +501,7 @@ namespace glm // -- Binary arithmetic operators -- template - 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>( v.x + scalar, @@ -510,7 +510,7 @@ namespace glm } template - 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>( v.x + scalar.x, @@ -519,7 +519,7 @@ namespace glm } template - 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>( scalar + v.x, @@ -528,7 +528,7 @@ namespace glm } template - 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>( scalar.x + v.x, @@ -537,7 +537,7 @@ namespace glm } template - 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>( v1.x + v2.x, @@ -546,7 +546,7 @@ namespace glm } template - 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>( v.x - scalar, @@ -555,7 +555,7 @@ namespace glm } template - 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>( v.x - scalar.x, @@ -564,7 +564,7 @@ namespace glm } template - 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>( scalar - v.x, @@ -573,7 +573,7 @@ namespace glm } template - 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>( scalar.x - v.x, @@ -582,7 +582,7 @@ namespace glm } template - 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>( v1.x - v2.x, @@ -591,7 +591,7 @@ namespace glm } template - 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>( v.x * scalar, @@ -600,7 +600,7 @@ namespace glm } template - 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>( v.x * scalar.x, @@ -609,7 +609,7 @@ namespace glm } template - 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>( scalar * v.x, @@ -618,7 +618,7 @@ namespace glm } template - 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>( scalar.x * v.x, @@ -627,7 +627,7 @@ namespace glm } template - 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>( v1.x * v2.x, @@ -636,7 +636,7 @@ namespace glm } template - 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>( v.x / scalar, @@ -645,7 +645,7 @@ namespace glm } template - 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>( v.x / scalar.x, @@ -654,7 +654,7 @@ namespace glm } template - 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>( scalar / v.x, @@ -663,7 +663,7 @@ namespace glm } template - 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>( scalar.x / v.x, @@ -672,7 +672,7 @@ namespace glm } template - 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>( v1.x / v2.x, @@ -683,7 +683,7 @@ namespace glm // -- Binary bit operators -- template - 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>( v.x % scalar, @@ -692,7 +692,7 @@ namespace glm } template - 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>( v.x % scalar.x, @@ -701,7 +701,7 @@ namespace glm } template - 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>( scalar % v.x, @@ -710,7 +710,7 @@ namespace glm } template - 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>( scalar.x % v.x, @@ -719,7 +719,7 @@ namespace glm } template - 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>( v1.x % v2.x, @@ -728,7 +728,7 @@ namespace glm } template - 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>( v.x & scalar, @@ -737,7 +737,7 @@ namespace glm } template - 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>( v.x & scalar.x, @@ -746,7 +746,7 @@ namespace glm } template - 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>( scalar & v.x, @@ -755,7 +755,7 @@ namespace glm } template - 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>( scalar.x & v.x, @@ -764,7 +764,7 @@ namespace glm } template - 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>( v1.x & v2.x, @@ -773,7 +773,7 @@ namespace glm } template - 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>( v.x | scalar, @@ -782,7 +782,7 @@ namespace glm } template - 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>( v.x | scalar.x, @@ -791,7 +791,7 @@ namespace glm } template - 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>( scalar | v.x, @@ -800,7 +800,7 @@ namespace glm } template - 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>( scalar.x | v.x, @@ -809,7 +809,7 @@ namespace glm } template - 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>( v1.x | v2.x, @@ -818,7 +818,7 @@ namespace glm } template - 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>( v.x ^ scalar, @@ -827,7 +827,7 @@ namespace glm } template - 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>( v.x ^ scalar.x, @@ -836,7 +836,7 @@ namespace glm } template - 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>( scalar ^ v.x, @@ -845,7 +845,7 @@ namespace glm } template - 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>( scalar.x ^ v.x, @@ -854,7 +854,7 @@ namespace glm } template - 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>( v1.x ^ v2.x, @@ -863,7 +863,7 @@ namespace glm } template - 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>( v.x << scalar, @@ -872,7 +872,7 @@ namespace glm } template - 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>( v.x << scalar.x, @@ -881,7 +881,7 @@ namespace glm } template - 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>( scalar << v.x, @@ -890,7 +890,7 @@ namespace glm } template - 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>( scalar.x << v.x, @@ -899,7 +899,7 @@ namespace glm } template - 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>( v1.x << v2.x, @@ -908,7 +908,7 @@ namespace glm } template - 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>( v.x >> scalar, @@ -917,7 +917,7 @@ namespace glm } template - 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>( v.x >> scalar.x, @@ -926,7 +926,7 @@ namespace glm } template - 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>( scalar >> v.x, @@ -935,7 +935,7 @@ namespace glm } template - 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>( scalar.x >> v.x, @@ -944,7 +944,7 @@ namespace glm } template - 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>( v1.x >> v2.x, @@ -953,7 +953,7 @@ namespace glm } template - 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>( ~v.x, @@ -964,7 +964,7 @@ namespace glm // -- Boolean operators -- template - 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 detail::compute_equal::call(v1.x, v2.x) && @@ -973,19 +973,19 @@ namespace glm } template - 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); } template - 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); } template - 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); } diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 92e4b7a2..f81ce3d3 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -85,7 +85,7 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;} GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; + GLM_FUNC_DECL T const& operator[](length_type i) const; // -- Implicit basic constructors -- @@ -150,43 +150,43 @@ namespace glm // -- Swizzle constructors -- # if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template - GLM_FUNC_DECL vec(detail::_swizzle<4, T, P, E0, E1, E2, E3> const & that) + GLM_FUNC_DECL vec(detail::_swizzle<4, T, P, E0, E1, E2, E3> const& that) { *this = that(); } template - GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v, detail::_swizzle<2, T, P, F0, F1, -1, -2> const & u) + GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v, detail::_swizzle<2, T, P, F0, F1, -1, -2> const& u) { *this = vec<4, T, P>(v(), u()); } template - GLM_FUNC_DECL vec(T const & x, T const & y, detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v) + GLM_FUNC_DECL vec(T const& x, T const& y, detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v) { *this = vec<4, T, P>(x, y, v()); } template - GLM_FUNC_DECL vec(T const & x, detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v, T const & w) + GLM_FUNC_DECL vec(T const& x, detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v, T const& w) { *this = vec<4, T, P>(x, v(), w); } template - GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const & v, T const & z, T const & w) + GLM_FUNC_DECL vec(detail::_swizzle<2, T, P, E0, E1, -1, -2> const& v, T const& z, T const& w) { *this = vec<4, T, P>(v(), z, w); } template - GLM_FUNC_DECL vec(detail::_swizzle<3, T, P, E0, E1, E2, -1> const & v, T const & w) + GLM_FUNC_DECL vec(detail::_swizzle<3, T, P, E0, E1, E2, -1> const& v, T const& w) { *this = vec<4, T, P>(v(), w); } template - GLM_FUNC_DECL vec(T const & x, detail::_swizzle<3, T, P, E0, E1, E2, -1> const & v) + GLM_FUNC_DECL vec(T const& x, detail::_swizzle<3, T, P, E0, E1, E2, -1> const& v) { *this = vec<4, T, P>(x, v()); } @@ -194,22 +194,22 @@ namespace glm // -- Unary arithmetic operators -- - GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, T, P> const & v) GLM_DEFAULT; + GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, T, P> const& v) GLM_DEFAULT; template - GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P>& operator+=(U scalar); template - GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P>& operator-=(U scalar); template - GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P>& operator*=(U scalar); template @@ -219,9 +219,9 @@ namespace glm template GLM_FUNC_DECL vec<4, T, P>& operator/=(U scalar); template - GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<4, U, P> const& v); // -- Increment and decrement operators -- @@ -235,217 +235,217 @@ namespace glm template GLM_FUNC_DECL vec<4, T, P> & operator%=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P> & operator&=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P> & operator|=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P> & operator^=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P> & operator<<=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<4, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P> & operator>>=(U scalar); template - GLM_FUNC_DECL vec<4, T, P> & operator>>=(vec<1, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator>>=(vec<1, U, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> & operator>>=(vec<4, U, P> const & v); + GLM_FUNC_DECL vec<4, T, P> & operator>>=(vec<4, U, P> const& v); }; // -- Unary operators -- template - 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 - 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 -- template - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 -- template - 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 - 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 - 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 - 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 #ifndef GLM_EXTERNAL_TEMPLATE diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 84f22a1a..8ab775a8 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -37,7 +37,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); } @@ -46,7 +46,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w); } @@ -55,7 +55,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); } @@ -64,7 +64,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w); } @@ -73,7 +73,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x % b.x, a.y % b.y, a.z % b.z, a.w % b.w); } @@ -82,7 +82,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x & b.x, a.y & b.y, a.z & b.z, a.w & b.w); } @@ -91,7 +91,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x | b.x, a.y | b.y, a.z | b.z, a.w | b.w); } @@ -100,7 +100,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x ^ b.x, a.y ^ b.y, a.z ^ b.z, a.w ^ b.w); } @@ -109,7 +109,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x << b.x, a.y << b.y, a.z << b.z, a.w << b.w); } @@ -118,7 +118,7 @@ namespace detail template 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) { return vec<4, T, P>(a.x >> b.x, a.y >> b.y, a.z >> b.z, a.w >> b.w); } @@ -127,7 +127,7 @@ namespace detail template 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) { return detail::compute_equal::call(v1.x, v2.x) && @@ -140,7 +140,7 @@ namespace detail template 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) { return !compute_vec4_equal::value, sizeof(T) * 8, detail::is_aligned

::value>::call(v1, v2); } @@ -149,7 +149,7 @@ namespace detail template 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) { return vec<4, T, P>(~v.x, ~v.y, ~v.z, ~v.w); } @@ -166,14 +166,14 @@ namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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) {} # endif//!GLM_HAS_DEFAULTED_FUNCTIONS template template - 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) {} @@ -339,7 +339,7 @@ namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template - 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->y = v.y; @@ -351,7 +351,7 @@ namespace detail template template - 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) { this->x = static_cast(v.x); this->y = static_cast(v.y); @@ -369,14 +369,14 @@ namespace detail template template - 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::value>::call(*this, vec<4, T, P>(v.x))); } template template - 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::value>::call(*this, vec<4, T, P>(v))); } @@ -390,14 +390,14 @@ namespace detail template template - 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::value>::call(*this, vec<4, T, P>(v.x))); } template template - 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::value>::call(*this, vec<4, T, P>(v))); } @@ -411,14 +411,14 @@ namespace detail template template - 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::value>::call(*this, vec<4, T, P>(v.x))); } template template - 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::value>::call(*this, vec<4, T, P>(v))); } @@ -432,14 +432,14 @@ namespace detail template template - 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::value>::call(*this, vec<4, T, P>(v.x))); } template template - 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_div::value>::call(*this, vec<4, T, P>(v))); } @@ -514,14 +514,14 @@ namespace detail template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } @@ -535,14 +535,14 @@ namespace detail template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } @@ -556,14 +556,14 @@ namespace detail template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } @@ -577,14 +577,14 @@ namespace detail template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } @@ -598,14 +598,14 @@ namespace detail template template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } template template - 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_right::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(v))); } @@ -613,13 +613,13 @@ namespace detail // -- Unary constant operators -- template - 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; } template - 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; } @@ -627,121 +627,121 @@ namespace detail // -- Binary arithmetic operators -- template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } @@ -749,187 +749,187 @@ namespace detail // -- Binary bit operators -- template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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; } template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(v); } @@ -937,25 +937,25 @@ namespace detail // -- Boolean operators -- template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(v1, v2); } template - 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::value, sizeof(T) * 8, detail::is_aligned

::value>::call(v1, v2); } template - 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); } template - 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); } diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index 287d6ec1..a2d155a7 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -54,7 +54,7 @@ namespace detail template struct compute_vec4_add { - 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) { vec<4, float, P> Result; Result.data = _mm_add_ps(a.data, b.data); @@ -66,7 +66,7 @@ namespace detail template struct compute_vec4_add { - 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) { vec<4, double, P> Result; Result.data = _mm256_add_pd(a.data, b.data); @@ -78,7 +78,7 @@ namespace detail template struct compute_vec4_sub { - 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) { vec<4, float, P> Result; Result.data = _mm_sub_ps(a.data, b.data); @@ -90,7 +90,7 @@ namespace detail template struct compute_vec4_sub { - 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) { vec<4, double, P> Result; Result.data = _mm256_sub_pd(a.data, b.data); @@ -102,7 +102,7 @@ namespace detail template struct compute_vec4_mul { - 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) { vec<4, float, P> Result; Result.data = _mm_mul_ps(a.data, b.data); @@ -114,7 +114,7 @@ namespace detail template struct compute_vec4_mul { - 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) { vec<4, double, P> Result; Result.data = _mm256_mul_pd(a.data, b.data); @@ -126,7 +126,7 @@ namespace detail template struct compute_vec4_div { - 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) { vec<4, float, P> Result; Result.data = _mm_div_ps(a.data, b.data); @@ -138,7 +138,7 @@ namespace detail template struct compute_vec4_div { - 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) { vec<4, double, P> Result; Result.data = _mm256_div_pd(a.data, b.data); @@ -150,7 +150,7 @@ namespace detail template<> struct compute_vec4_div { - static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const & a, vec<4, float, aligned_lowp> const & b) + static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& a, vec<4, float, aligned_lowp> const& b) { vec<4, float, aligned_lowp> Result; Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data)); @@ -281,7 +281,7 @@ namespace detail template struct compute_vec4_bitwise_not { - static vec<4, T, P> call(vec<4, T, P> const & v) + static vec<4, T, P> call(vec<4, T, P> const& v) { vec<4, T, P> Result; Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1)); @@ -293,7 +293,7 @@ namespace detail template struct compute_vec4_bitwise_not { - static vec<4, T, P> call(vec<4, T, P> const & v) + static vec<4, T, P> call(vec<4, T, P> const& v) { vec<4, T, P> Result; Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1)); @@ -305,7 +305,7 @@ namespace detail template struct compute_vec4_equal { - 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) { return _mm_movemask_ps(_mm_cmpeq_ps(v1.data, v2.data)) != 0; } @@ -314,7 +314,7 @@ namespace detail template struct compute_vec4_equal { - 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) { return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0; } @@ -323,7 +323,7 @@ namespace detail template struct compute_vec4_nequal { - 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) { return _mm_movemask_ps(_mm_cmpneq_ps(v1.data, v2.data)) != 0; } @@ -332,7 +332,7 @@ namespace detail template struct compute_vec4_nequal { - 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) { return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0; } diff --git a/glm/gtc/bitfield.hpp b/glm/gtc/bitfield.hpp index 2d09fba5..60f4a43f 100644 --- a/glm/gtc/bitfield.hpp +++ b/glm/gtc/bitfield.hpp @@ -40,7 +40,7 @@ namespace glm /// /// @see gtc_bitfield template class vecIUType> - GLM_FUNC_DECL vecIUType mask(vecIUType const & v); + GLM_FUNC_DECL vecIUType mask(vecIUType const& v); /// Rotate all bits to the right. All the bits dropped in the right side are inserted back on the left side. /// @@ -52,7 +52,7 @@ namespace glm /// /// @see gtc_bitfield template - GLM_FUNC_DECL vec bitfieldRotateRight(vec const & In, int Shift); + GLM_FUNC_DECL vec bitfieldRotateRight(vec 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. /// @@ -64,7 +64,7 @@ namespace glm /// /// @see gtc_bitfield template - GLM_FUNC_DECL vec bitfieldRotateLeft(vec const & In, int Shift); + GLM_FUNC_DECL vec bitfieldRotateLeft(vec const& In, int Shift); /// Set to 1 a range of bits. /// @@ -76,7 +76,7 @@ namespace glm /// /// @see gtc_bitfield template - GLM_FUNC_DECL vec bitfieldFillOne(vec const & Value, int FirstBit, int BitCount); + GLM_FUNC_DECL vec bitfieldFillOne(vec const& Value, int FirstBit, int BitCount); /// Set to 0 a range of bits. /// @@ -88,7 +88,7 @@ namespace glm /// /// @see gtc_bitfield template - GLM_FUNC_DECL vec bitfieldFillZero(vec const & Value, int FirstBit, int BitCount); + GLM_FUNC_DECL vec bitfieldFillZero(vec const& Value, int FirstBit, int BitCount); /// Interleaves the bits of x and y. /// The first bit is the first bit of x followed by the first bit of y. diff --git a/glm/gtc/bitfield.inl b/glm/gtc/bitfield.inl index d3490136..acd39c24 100644 --- a/glm/gtc/bitfield.inl +++ b/glm/gtc/bitfield.inl @@ -248,7 +248,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec bitfieldRotateRight(vec const & In, int Shift) + GLM_FUNC_QUALIFIER vec bitfieldRotateRight(vec const& In, int Shift) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldRotateRight' accepts only integer values"); diff --git a/glm/gtc/color_space.hpp b/glm/gtc/color_space.hpp index 4251f492..7a51667f 100644 --- a/glm/gtc/color_space.hpp +++ b/glm/gtc/color_space.hpp @@ -33,22 +33,22 @@ namespace glm /// 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 template - GLM_FUNC_DECL vec convertLinearToSRGB(vec const & ColorLinear); + GLM_FUNC_DECL vec convertLinearToSRGB(vec const& ColorLinear); /// 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 template - GLM_FUNC_DECL vec convertLinearToSRGB(vec const & ColorLinear, T Gamma); + GLM_FUNC_DECL vec convertLinearToSRGB(vec const& ColorLinear, T Gamma); /// 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 template - GLM_FUNC_DECL vec convertSRGBToLinear(vec const & ColorSRGB); + GLM_FUNC_DECL vec convertSRGBToLinear(vec const& ColorSRGB); /// 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 template - GLM_FUNC_DECL vec convertSRGBToLinear(vec const & ColorSRGB, T Gamma); + GLM_FUNC_DECL vec convertSRGBToLinear(vec const& ColorSRGB, T Gamma); /// @} } //namespace glm diff --git a/glm/gtc/epsilon.hpp b/glm/gtc/epsilon.hpp index fc0dbfae..9f6db975 100644 --- a/glm/gtc/epsilon.hpp +++ b/glm/gtc/epsilon.hpp @@ -31,28 +31,28 @@ namespace glm /// /// @see gtc_epsilon template - GLM_FUNC_DECL vec epsilonEqual(vec const& x, vec const& y, T const & epsilon); + GLM_FUNC_DECL vec epsilonEqual(vec const& x, vec const& y, T const& epsilon); /// Returns the component-wise comparison of |x - y| < epsilon. /// True if this expression is satisfied. /// /// @see gtc_epsilon template - GLM_FUNC_DECL bool epsilonEqual(genType const & x, genType const & y, genType const & epsilon); + GLM_FUNC_DECL bool epsilonEqual(genType const& x, genType const& y, genType const& epsilon); /// Returns the component-wise comparison of |x - y| < epsilon. /// True if this expression is not satisfied. /// /// @see gtc_epsilon template - GLM_FUNC_DECL vec epsilonNotEqual(vec const& x, vec const& y, T const & epsilon); + GLM_FUNC_DECL vec epsilonNotEqual(vec const& x, vec const& y, T const& epsilon); /// Returns the component-wise comparison of |x - y| >= epsilon. /// True if this expression is not satisfied. /// /// @see gtc_epsilon template - GLM_FUNC_DECL bool epsilonNotEqual(genType const & x, genType const & y, genType const & epsilon); + GLM_FUNC_DECL bool epsilonNotEqual(genType const& x, genType const& y, genType const& epsilon); /// @} }//namespace glm diff --git a/glm/gtc/epsilon.inl b/glm/gtc/epsilon.inl index 4e6eaa4a..d04e3cff 100644 --- a/glm/gtc/epsilon.inl +++ b/glm/gtc/epsilon.inl @@ -14,9 +14,9 @@ namespace glm template<> GLM_FUNC_QUALIFIER bool epsilonEqual ( - float const & x, - float const & y, - float const & epsilon + float const& x, + float const& y, + float const& epsilon ) { return abs(x - y) < epsilon; @@ -25,9 +25,9 @@ namespace glm template<> GLM_FUNC_QUALIFIER bool epsilonEqual ( - double const & x, - double const & y, - double const & epsilon + double const& x, + double const& y, + double const& epsilon ) { return abs(x - y) < epsilon; @@ -46,7 +46,7 @@ namespace glm } template<> - GLM_FUNC_QUALIFIER bool epsilonNotEqual(float const& x, float const & y, float const& epsilon) + GLM_FUNC_QUALIFIER bool epsilonNotEqual(float const& x, float const& y, float const& epsilon) { return abs(x - y) >= epsilon; } @@ -70,7 +70,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual(tquat const& x, tquat const & y, T const& epsilon) + GLM_FUNC_QUALIFIER vec<4, bool, P> epsilonEqual(tquat const& x, tquat 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); return lessThan(abs(v), vec<4, T, P>(epsilon)); diff --git a/glm/gtc/matrix_access.hpp b/glm/gtc/matrix_access.hpp index ae3bd8d1..48beb8b8 100644 --- a/glm/gtc/matrix_access.hpp +++ b/glm/gtc/matrix_access.hpp @@ -27,31 +27,31 @@ namespace glm /// @see gtc_matrix_access template GLM_FUNC_DECL typename genType::row_type row( - genType const & m, + genType const& m, length_t index); /// Set a specific row to a matrix. /// @see gtc_matrix_access template GLM_FUNC_DECL genType row( - genType const & m, + genType const& m, length_t index, - typename genType::row_type const & x); + typename genType::row_type const& x); /// Get a specific column of a matrix. /// @see gtc_matrix_access template GLM_FUNC_DECL typename genType::col_type column( - genType const & m, + genType const& m, length_t index); /// Set a specific column to a matrix. /// @see gtc_matrix_access template GLM_FUNC_DECL genType column( - genType const & m, + genType const& m, length_t index, - typename genType::col_type const & x); + typename genType::col_type const& x); /// @} }//namespace glm diff --git a/glm/gtc/matrix_access.inl b/glm/gtc/matrix_access.inl index 23ba348c..dd307a01 100644 --- a/glm/gtc/matrix_access.inl +++ b/glm/gtc/matrix_access.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER genType row ( - genType const & m, + genType const& m, length_t index, - typename genType::row_type const & x + typename genType::row_type const& x ) { assert(index >= 0 && index < m[0].length()); @@ -22,7 +22,7 @@ namespace glm template GLM_FUNC_QUALIFIER typename genType::row_type row ( - genType const & m, + genType const& m, length_t index ) { @@ -37,9 +37,9 @@ namespace glm template GLM_FUNC_QUALIFIER genType column ( - genType const & m, + genType const& m, length_t index, - typename genType::col_type const & x + typename genType::col_type const& x ) { assert(index >= 0 && index < m.length()); @@ -52,7 +52,7 @@ namespace glm template GLM_FUNC_QUALIFIER typename genType::col_type column ( - genType const & m, + genType const& m, length_t index ) { diff --git a/glm/gtc/matrix_inverse.hpp b/glm/gtc/matrix_inverse.hpp index 3d1cd210..1f64efeb 100644 --- a/glm/gtc/matrix_inverse.hpp +++ b/glm/gtc/matrix_inverse.hpp @@ -33,7 +33,7 @@ namespace glm /// @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 template - GLM_FUNC_DECL genType affineInverse(genType const & m); + GLM_FUNC_DECL genType affineInverse(genType const& m); /// Compute the inverse transpose of a matrix. /// @@ -41,7 +41,7 @@ namespace glm /// @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 template - GLM_FUNC_DECL genType inverseTranspose(genType const & m); + GLM_FUNC_DECL genType inverseTranspose(genType const& m); /// @} }//namespace glm diff --git a/glm/gtc/matrix_inverse.inl b/glm/gtc/matrix_inverse.inl index 88f2ad68..0e2bf254 100644 --- a/glm/gtc/matrix_inverse.inl +++ b/glm/gtc/matrix_inverse.inl @@ -4,7 +4,7 @@ namespace glm { template - 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))); @@ -15,7 +15,7 @@ namespace glm } template - 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))); @@ -27,7 +27,7 @@ namespace glm } template - 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]; @@ -41,7 +41,7 @@ namespace glm } template - 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 = + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) @@ -64,7 +64,7 @@ namespace glm } template - 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 SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 94d09138..7f9a50c7 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -52,12 +52,12 @@ namespace glm /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f /// @endcode /// @see gtc_matrix_transform - /// @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(mat<4, 4, T, P> const& m, T x, T y, T z) + /// @see - translate(vec<3, T, P> const& v) template GLM_FUNC_DECL mat<4, 4, T, P> translate( mat<4, 4, T, P> const& m, - vec<3, T, P> const & v); + vec<3, T, P> const& v); /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. /// @@ -66,13 +66,13 @@ namespace glm /// @param axis Rotation axis, recommended to be normalized. /// @tparam T Value type used to build the matrix. Supported: half, float or double. /// @see gtc_matrix_transform - /// @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(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) template GLM_FUNC_DECL mat<4, 4, T, P> rotate( mat<4, 4, T, P> const& m, T angle, - vec<3, T, P> const & axis); + vec<3, T, P> const& axis); /// Builds a scale 4 * 4 matrix created from 3 scalars. /// @@ -80,12 +80,12 @@ namespace glm /// @param v Ratio of scaling for each axis. /// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double. /// @see gtc_matrix_transform - /// @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(mat<4, 4, T, P> const& m, T x, T y, T z) + /// @see - scale(vec<3, T, P> const& v) template GLM_FUNC_DECL mat<4, 4, T, P> scale( mat<4, 4, T, P> const& m, - vec<3, T, P> const & v); + vec<3, T, P> const& v); /// Creates a matrix for an orthographic parallel viewing volume, using the default handedness. /// @@ -97,7 +97,7 @@ namespace glm /// @param zFar /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top) template GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho( T left, @@ -117,7 +117,7 @@ namespace glm /// @param zFar /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top) template GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH( T left, @@ -137,7 +137,7 @@ namespace glm /// @param zFar /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top) template GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH( T left, @@ -155,7 +155,7 @@ namespace glm /// @param top /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) + /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar) template GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho( T left, @@ -384,10 +384,10 @@ namespace glm /// @see gtc_matrix_transform template 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& proj, - vec<4, U, P> const & viewport); + vec<4, U, P> const& viewport); /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. /// @@ -401,10 +401,10 @@ namespace glm /// @see gtc_matrix_transform template 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& proj, - vec<4, U, P> const & viewport); + vec<4, U, P> const& viewport); /// Define a picking region /// @@ -416,9 +416,9 @@ namespace glm /// @see gtc_matrix_transform template GLM_FUNC_DECL mat<4, 4, T, P> pickMatrix( - vec<2, T, P> const & center, - vec<2, T, P> const & delta, - vec<4, U, P> const & viewport); + vec<2, T, P> const& center, + vec<2, T, P> const& delta, + vec<4, U, P> const& viewport); /// Build a look at view matrix based on the default handedness. /// @@ -426,12 +426,12 @@ namespace glm /// @param center Position where the camera is looking at /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) /// @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 GLM_FUNC_DECL mat<4, 4, T, P> lookAt( - vec<3, T, P> const & eye, - vec<3, T, P> const & center, - vec<3, T, P> const & up); + vec<3, T, P> const& eye, + vec<3, T, P> const& center, + vec<3, T, P> const& up); /// Build a right handed look at view matrix. /// @@ -439,12 +439,12 @@ namespace glm /// @param center Position where the camera is looking at /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) /// @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 GLM_FUNC_DECL mat<4, 4, T, P> lookAtRH( - vec<3, T, P> const & eye, - vec<3, T, P> const & center, - vec<3, T, P> const & up); + vec<3, T, P> const& eye, + vec<3, T, P> const& center, + vec<3, T, P> const& up); /// Build a left handed look at view matrix. /// @@ -452,12 +452,12 @@ namespace glm /// @param center Position where the camera is looking at /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) /// @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 GLM_FUNC_DECL mat<4, 4, T, P> lookAtLH( - vec<3, T, P> const & eye, - vec<3, T, P> const & center, - vec<3, T, P> const & up); + vec<3, T, P> const& eye, + vec<3, T, P> const& center, + vec<3, T, P> const& up); /// @} }//namespace glm diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 7fdf7268..e3749b49 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -8,7 +8,7 @@ namespace glm { template - 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); Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; @@ -16,7 +16,7 @@ namespace glm } template - 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 c = cos(a); @@ -47,7 +47,7 @@ namespace glm } template - 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 c = cos(a); @@ -76,7 +76,7 @@ namespace glm } template - 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; Result[0] = m[0] * v[0]; @@ -87,7 +87,7 @@ namespace glm } template - 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)); Result[0][0] = v.x; @@ -438,10 +438,10 @@ namespace glm template GLM_FUNC_QUALIFIER 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& proj, - vec<4, U, P> const & viewport + vec<4, U, P> const& viewport ) { vec<4, T, P> tmp = vec<4, T, P>(obj, static_cast(1)); @@ -464,10 +464,10 @@ namespace glm template GLM_FUNC_QUALIFIER 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& proj, - vec<4, U, P> const & viewport + vec<4, U, P> const& viewport ) { mat<4, 4, T, P> Inverse = inverse(proj * model); @@ -489,7 +489,7 @@ namespace glm } template - 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(0) && delta.y > static_cast(0)); mat<4, 4, T, P> Result(static_cast(1)); @@ -508,7 +508,7 @@ namespace glm } template - 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 return lookAtLH(eye, center, up); @@ -520,9 +520,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtRH ( - vec<3, T, P> const & eye, - vec<3, T, P> const & center, - vec<3, T, P> const & up + vec<3, T, P> const& eye, + vec<3, T, P> const& center, + vec<3, T, P> const& up ) { vec<3, T, P> const f(normalize(center - eye)); @@ -548,9 +548,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> lookAtLH ( - vec<3, T, P> const & eye, - vec<3, T, P> const & center, - vec<3, T, P> const & up + vec<3, T, P> const& eye, + vec<3, T, P> const& center, + vec<3, T, P> const& up ) { vec<3, T, P> const f(normalize(center - eye)); diff --git a/glm/gtc/noise.inl b/glm/gtc/noise.inl index 55ecc6f9..e1b5eae1 100644 --- a/glm/gtc/noise.inl +++ b/glm/gtc/noise.inl @@ -10,7 +10,7 @@ namespace glm{ namespace gtc { template - 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); T pW = static_cast(1.5) - dot(abs(pXYZ), vec<3, T, P>(1)); @@ -22,7 +22,7 @@ namespace gtc // Classic Perlin noise template - 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> Pf = glm::fract(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) - vec<4, T, P>(0.0, 0.0, 1.0, 1.0); @@ -63,7 +63,7 @@ namespace gtc // Classic Perlin noise template - 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> Pi1 = Pi0 + T(1); // Integer part + 1 @@ -134,7 +134,7 @@ namespace gtc /* // Classic Perlin noise template - 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> Pi1 = Pi0 + T(1); // Integer part + 1 @@ -207,7 +207,7 @@ namespace gtc */ // Classic Perlin noise template - 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> Pi1 = Pi0 + T(1); // Integer part + 1 @@ -343,7 +343,7 @@ namespace gtc // Classic Perlin noise, periodic variant template - 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> Pf = fract(vec<4, T, P>(Position.x, Position.y, Position.x, Position.y)) - vec<4, T, P>(0.0, 0.0, 1.0, 1.0); @@ -385,7 +385,7 @@ namespace gtc // Classic Perlin noise, periodic variant template - 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> Pi1 = mod(Pi0 + vec<3, T, P>(T(1)), rep); // Integer part + 1, mod period @@ -456,7 +456,7 @@ namespace gtc // Classic Perlin noise, periodic version template - 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> Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep @@ -589,7 +589,7 @@ namespace gtc } template - 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>( T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 @@ -646,7 +646,7 @@ namespace gtc } template - 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<4, T, P> const D(0.0, 0.5, 1.0, 2.0); @@ -721,7 +721,7 @@ namespace gtc } template - 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( 0.138196601125011, // (5 - sqrt(5))/20 G4 diff --git a/glm/gtc/packing.hpp b/glm/gtc/packing.hpp index 6d66e2ba..5e8ad6fb 100644 --- a/glm/gtc/packing.hpp +++ b/glm/gtc/packing.hpp @@ -32,8 +32,8 @@ namespace glm /// packUnorm1x8: round(clamp(c, 0, +1) * 255.0) /// /// @see gtc_packing - /// @see uint16 packUnorm2x8(vec2 const & v) - /// @see uint32 packUnorm4x8(vec4 const & v) + /// @see uint16 packUnorm2x8(vec2 const& v) + /// @see uint32 packUnorm4x8(vec4 const& v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL uint8 packUnorm1x8(float v); @@ -60,11 +60,11 @@ namespace glm /// the last component will be written to the most significant bits. /// /// @see gtc_packing - /// @see uint8 packUnorm1x8(float const & v) - /// @see uint32 packUnorm4x8(vec4 const & v) + /// @see uint8 packUnorm1x8(float const& v) + /// @see uint32 packUnorm4x8(vec4 const& v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v); + GLM_FUNC_DECL uint16 packUnorm2x8(vec2 const& v); /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. @@ -89,8 +89,8 @@ namespace glm /// packSnorm1x8: round(clamp(s, -1, +1) * 127.0) /// /// @see gtc_packing - /// @see uint16 packSnorm2x8(vec2 const & v) - /// @see uint32 packSnorm4x8(vec4 const & v) + /// @see uint16 packSnorm2x8(vec2 const& v) + /// @see uint32 packSnorm4x8(vec4 const& v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL uint8 packSnorm1x8(float s); @@ -118,11 +118,11 @@ namespace glm /// the last component will be written to the most significant bits. /// /// @see gtc_packing - /// @see uint8 packSnorm1x8(float const & v) - /// @see uint32 packSnorm4x8(vec4 const & v) + /// @see uint8 packSnorm1x8(float const& v) + /// @see uint32 packSnorm4x8(vec4 const& v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v); + GLM_FUNC_DECL uint16 packSnorm2x8(vec2 const& v); /// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector. @@ -147,8 +147,8 @@ namespace glm /// packUnorm1x16: round(clamp(c, 0, +1) * 65535.0) /// /// @see gtc_packing - /// @see uint16 packSnorm1x16(float const & v) - /// @see uint64 packSnorm4x16(vec4 const & v) + /// @see uint16 packSnorm1x16(float const& v) + /// @see uint64 packSnorm4x16(vec4 const& v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL uint16 packUnorm1x16(float v); @@ -176,11 +176,11 @@ namespace glm /// the last component will be written to the most significant bits. /// /// @see gtc_packing - /// @see uint16 packUnorm1x16(float const & v) - /// @see uint32 packUnorm2x16(vec2 const & v) + /// @see uint16 packUnorm1x16(float const& v) + /// @see uint32 packUnorm2x16(vec2 const& v) /// @see GLSL packUnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v); + GLM_FUNC_DECL uint64 packUnorm4x16(vec4 const& v); /// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -205,8 +205,8 @@ namespace glm /// packSnorm1x8: round(clamp(s, -1, +1) * 32767.0) /// /// @see gtc_packing - /// @see uint32 packSnorm2x16(vec2 const & v) - /// @see uint64 packSnorm4x16(vec4 const & v) + /// @see uint32 packSnorm2x16(vec2 const& v) + /// @see uint64 packSnorm4x16(vec4 const& v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL uint16 packSnorm1x16(float v); @@ -234,11 +234,11 @@ namespace glm /// the last component will be written to the most significant bits. /// /// @see gtc_packing - /// @see uint16 packSnorm1x16(float const & v) - /// @see uint32 packSnorm2x16(vec2 const & v) + /// @see uint16 packSnorm1x16(float const& v) + /// @see uint32 packSnorm2x16(vec2 const& v) /// @see GLSL packSnorm4x8 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v); + GLM_FUNC_DECL uint64 packSnorm4x16(vec4 const& v); /// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -261,8 +261,8 @@ namespace glm /// and then packing this 16-bit value into a 16-bit unsigned integer. /// /// @see gtc_packing - /// @see uint32 packHalf2x16(vec2 const & v) - /// @see uint64 packHalf4x16(vec4 const & v) + /// @see uint32 packHalf2x16(vec2 const& v) + /// @see uint64 packHalf4x16(vec4 const& v) /// @see GLSL packHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL uint16 packHalf1x16(float v); @@ -272,8 +272,8 @@ namespace glm /// and converting it to 32-bit floating-point values. /// /// @see gtc_packing - /// @see vec2 unpackHalf2x16(uint32 const & v) - /// @see vec4 unpackHalf4x16(uint64 const & v) + /// @see vec2 unpackHalf2x16(uint32 const& v) + /// @see vec4 unpackHalf4x16(uint64 const& v) /// @see GLSL unpackHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL float unpackHalf1x16(uint16 v); @@ -285,11 +285,11 @@ namespace glm /// the forth component specifies the 16 most-significant bits. /// /// @see gtc_packing - /// @see uint16 packHalf1x16(float const & v) - /// @see uint32 packHalf2x16(vec2 const & v) + /// @see uint16 packHalf1x16(float const& v) + /// @see uint32 packHalf2x16(vec2 const& v) /// @see GLSL packHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - GLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v); + GLM_FUNC_DECL uint64 packHalf4x16(vec4 const& v); /// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values, /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, @@ -298,8 +298,8 @@ namespace glm /// the forth component is obtained from the 16 most-significant bits of v. /// /// @see gtc_packing - /// @see float unpackHalf1x16(uint16 const & v) - /// @see vec2 unpackHalf2x16(uint32 const & v) + /// @see float unpackHalf1x16(uint16 const& v) + /// @see vec2 unpackHalf2x16(uint32 const& v) /// @see GLSL unpackHalf2x16 man page /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions GLM_FUNC_DECL vec4 unpackHalf4x16(uint64 p); @@ -311,11 +311,11 @@ namespace glm /// the forth component specifies the 2 most-significant bits. /// /// @see gtc_packing - /// @see uint32 packI3x10_1x2(uvec4 const & v) - /// @see uint32 packSnorm3x10_1x2(vec4 const & v) - /// @see uint32 packUnorm3x10_1x2(vec4 const & v) - /// @see ivec4 unpackI3x10_1x2(uint32 const & p) - GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v); + /// @see uint32 packI3x10_1x2(uvec4 const& v) + /// @see uint32 packSnorm3x10_1x2(vec4 const& v) + /// @see uint32 packUnorm3x10_1x2(vec4 const& v) + /// @see ivec4 unpackI3x10_1x2(uint32 const& p) + GLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const& v); /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. /// @@ -323,9 +323,9 @@ namespace glm /// the last component will be extracted from the most significant bits. /// /// @see gtc_packing - /// @see uint32 packU3x10_1x2(uvec4 const & v) - /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); - /// @see uvec4 unpackI3x10_1x2(uint32 const & p); + /// @see uint32 packU3x10_1x2(uvec4 const& v) + /// @see vec4 unpackSnorm3x10_1x2(uint32 const& p); + /// @see uvec4 unpackI3x10_1x2(uint32 const& p); GLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 p); /// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector @@ -335,11 +335,11 @@ namespace glm /// the forth component specifies the 2 most-significant bits. /// /// @see gtc_packing - /// @see uint32 packI3x10_1x2(ivec4 const & v) - /// @see uint32 packSnorm3x10_1x2(vec4 const & v) - /// @see uint32 packUnorm3x10_1x2(vec4 const & v) - /// @see ivec4 unpackU3x10_1x2(uint32 const & p) - GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v); + /// @see uint32 packI3x10_1x2(ivec4 const& v) + /// @see uint32 packSnorm3x10_1x2(vec4 const& v) + /// @see uint32 packUnorm3x10_1x2(vec4 const& v) + /// @see ivec4 unpackU3x10_1x2(uint32 const& p) + GLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const& v); /// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. /// @@ -347,9 +347,9 @@ namespace glm /// the last component will be extracted from the most significant bits. /// /// @see gtc_packing - /// @see uint32 packU3x10_1x2(uvec4 const & v) - /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p); - /// @see uvec4 unpackI3x10_1x2(uint32 const & p); + /// @see uint32 packU3x10_1x2(uvec4 const& v) + /// @see vec4 unpackSnorm3x10_1x2(uint32 const& p); + /// @see uvec4 unpackI3x10_1x2(uint32 const& p); GLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 p); /// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values. @@ -364,11 +364,11 @@ namespace glm /// the forth component specifies the 2 most-significant bits. /// /// @see gtc_packing - /// @see vec4 unpackSnorm3x10_1x2(uint32 const & p) - /// @see uint32 packUnorm3x10_1x2(vec4 const & v) - /// @see uint32 packU3x10_1x2(uvec4 const & v) - /// @see uint32 packI3x10_1x2(ivec4 const & v) - GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v); + /// @see vec4 unpackSnorm3x10_1x2(uint32 const& p) + /// @see uint32 packUnorm3x10_1x2(vec4 const& v) + /// @see uint32 packU3x10_1x2(uvec4 const& v) + /// @see uint32 packI3x10_1x2(ivec4 const& v) + GLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const& v); /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -381,10 +381,10 @@ namespace glm /// the last component will be extracted from the most significant bits. /// /// @see gtc_packing - /// @see uint32 packSnorm3x10_1x2(vec4 const & v) - /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)) - /// @see uvec4 unpackI3x10_1x2(uint32 const & p) - /// @see uvec4 unpackU3x10_1x2(uint32 const & p) + /// @see uint32 packSnorm3x10_1x2(vec4 const& v) + /// @see vec4 unpackUnorm3x10_1x2(uint32 const& p)) + /// @see uvec4 unpackI3x10_1x2(uint32 const& p) + /// @see uvec4 unpackU3x10_1x2(uint32 const& p) GLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 p); /// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values. @@ -399,11 +399,11 @@ namespace glm /// the forth component specifies the 2 most-significant bits. /// /// @see gtc_packing - /// @see vec4 unpackUnorm3x10_1x2(uint32 const & p) - /// @see uint32 packUnorm3x10_1x2(vec4 const & v) - /// @see uint32 packU3x10_1x2(uvec4 const & v) - /// @see uint32 packI3x10_1x2(ivec4 const & v) - GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v); + /// @see vec4 unpackUnorm3x10_1x2(uint32 const& p) + /// @see uint32 packUnorm3x10_1x2(vec4 const& v) + /// @see uint32 packU3x10_1x2(uvec4 const& v) + /// @see uint32 packI3x10_1x2(ivec4 const& v) + GLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const& v); /// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. /// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector. @@ -416,10 +416,10 @@ namespace glm /// the last component will be extracted from the most significant bits. /// /// @see gtc_packing - /// @see uint32 packSnorm3x10_1x2(vec4 const & v) - /// @see vec4 unpackInorm3x10_1x2(uint32 const & p)) - /// @see uvec4 unpackI3x10_1x2(uint32 const & p) - /// @see uvec4 unpackU3x10_1x2(uint32 const & p) + /// @see uint32 packSnorm3x10_1x2(vec4 const& v) + /// @see vec4 unpackInorm3x10_1x2(uint32 const& p)) + /// @see uvec4 unpackI3x10_1x2(uint32 const& p) + /// @see uvec4 unpackU3x10_1x2(uint32 const& p) GLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 p); /// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values. @@ -430,8 +430,8 @@ namespace glm /// the last component specifies the 10 most-significant bits. /// /// @see gtc_packing - /// @see vec3 unpackF2x11_1x10(uint32 const & p) - GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v); + /// @see vec3 unpackF2x11_1x10(uint32 const& p) + GLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const& v); /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector. @@ -440,7 +440,7 @@ namespace glm /// the last component will be extracted from the most significant bits. /// /// @see gtc_packing - /// @see uint32 packF2x11_1x10(vec3 const & v) + /// @see uint32 packF2x11_1x10(vec3 const& v) GLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 p); @@ -454,8 +454,8 @@ namespace glm /// packF3x9_E1x5 allows encoding into RGBE / RGB9E5 format /// /// @see gtc_packing - /// @see vec3 unpackF3x9_E1x5(uint32 const & p) - GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const & v); + /// @see vec3 unpackF3x9_E1x5(uint32 const& p) + GLM_FUNC_DECL uint32 packF3x9_E1x5(vec3 const& v); /// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . /// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector. @@ -466,7 +466,7 @@ namespace glm /// unpackF3x9_E1x5 allows decoding RGBE / RGB9E5 data /// /// @see gtc_packing - /// @see uint32 packF3x9_E1x5(vec3 const & v) + /// @see uint32 packF3x9_E1x5(vec3 const& v) GLM_FUNC_DECL vec3 unpackF3x9_E1x5(uint32 p); /// Returns an unsigned integer vector obtained by converting the components of a floating-point vector @@ -475,20 +475,20 @@ namespace glm /// the forth component specifies the 16 most-significant bits. /// /// @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 GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - 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. /// 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. /// /// @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 GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - 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 /// to the 16-bit floating-point representation found in the OpenGL Specification. @@ -496,107 +496,107 @@ namespace glm /// the forth component specifies the 16 most-significant bits. /// /// @see gtc_packing - /// @see vec unpackHalf(vec const & p) + /// @see vec unpackHalf(vec const& p) /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - GLM_FUNC_DECL vec packHalf(vec const & v); + GLM_FUNC_DECL vec packHalf(vec 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. /// 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. /// /// @see gtc_packing - /// @see vec packHalf(vec const & v) + /// @see vec packHalf(vec const& v) /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions template - GLM_FUNC_DECL vec unpackHalf(vec const & p); + GLM_FUNC_DECL vec unpackHalf(vec const& p); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing - /// @see vec unpackUnorm(vec const & p); + /// @see vec unpackUnorm(vec const& p); template - GLM_FUNC_DECL vec packUnorm(vec const & v); + GLM_FUNC_DECL vec packUnorm(vec const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see vec packUnorm(vec const & v) + /// @see vec packUnorm(vec const& v) template - GLM_FUNC_DECL vec unpackUnorm(vec const & v); + GLM_FUNC_DECL vec unpackUnorm(vec const& v); /// Convert each component of the normalized floating-point vector into signed integer values. /// /// @see gtc_packing - /// @see vec unpackSnorm(vec const & p); + /// @see vec unpackSnorm(vec const& p); template - GLM_FUNC_DECL vec packSnorm(vec const & v); + GLM_FUNC_DECL vec packSnorm(vec const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see vec packSnorm(vec const & v) + /// @see vec packSnorm(vec const& v) template - GLM_FUNC_DECL vec unpackSnorm(vec const & v); + GLM_FUNC_DECL vec unpackSnorm(vec const& v); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing /// @see vec2 unpackUnorm2x4(uint8 p) - GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const & v); + GLM_FUNC_DECL uint8 packUnorm2x4(vec2 const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see uint8 packUnorm2x4(vec2 const & v) + /// @see uint8 packUnorm2x4(vec2 const& v) GLM_FUNC_DECL vec2 unpackUnorm2x4(uint8 p); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing /// @see vec4 unpackUnorm4x4(uint16 p) - GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const & v); + GLM_FUNC_DECL uint16 packUnorm4x4(vec4 const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see uint16 packUnorm4x4(vec4 const & v) + /// @see uint16 packUnorm4x4(vec4 const& v) GLM_FUNC_DECL vec4 unpackUnorm4x4(uint16 p); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing /// @see vec3 unpackUnorm1x5_1x6_1x5(uint16 p) - GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const & v); + GLM_FUNC_DECL uint16 packUnorm1x5_1x6_1x5(vec3 const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see uint16 packUnorm1x5_1x6_1x5(vec3 const & v) + /// @see uint16 packUnorm1x5_1x6_1x5(vec3 const& v) GLM_FUNC_DECL vec3 unpackUnorm1x5_1x6_1x5(uint16 p); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing /// @see vec4 unpackUnorm3x5_1x1(uint16 p) - GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const & v); + GLM_FUNC_DECL uint16 packUnorm3x5_1x1(vec4 const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see uint16 packUnorm3x5_1x1(vec4 const & v) + /// @see uint16 packUnorm3x5_1x1(vec4 const& v) GLM_FUNC_DECL vec4 unpackUnorm3x5_1x1(uint16 p); /// Convert each component of the normalized floating-point vector into unsigned integer values. /// /// @see gtc_packing /// @see vec3 unpackUnorm2x3_1x2(uint8 p) - GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const & v); + GLM_FUNC_DECL uint8 packUnorm2x3_1x2(vec3 const& v); /// Convert a packed integer to a normalized floating-point vector. /// /// @see gtc_packing - /// @see uint8 packUnorm2x3_1x2(vec3 const & v) + /// @see uint8 packUnorm2x3_1x2(vec3 const& v) GLM_FUNC_DECL vec3 unpackUnorm2x3_1x2(uint8 p); diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 5690b039..8e6340e5 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -278,7 +278,7 @@ namespace detail template 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) { int16 const Unpack(detail::toFloat16(v.x)); u16vec1 Packed; @@ -286,7 +286,7 @@ namespace detail return Packed; } - GLM_FUNC_QUALIFIER static vec<1, float, P> unpack(vec<1, uint16, P> const & v) + GLM_FUNC_QUALIFIER static vec<1, float, P> unpack(vec<1, uint16, P> const& v) { i16vec1 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); @@ -297,7 +297,7 @@ namespace detail template 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) { vec<2, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y)); u16vec2 Packed; @@ -305,7 +305,7 @@ namespace detail return Packed; } - GLM_FUNC_QUALIFIER static vec<2, float, P> unpack(vec<2, uint16, P> const & v) + GLM_FUNC_QUALIFIER static vec<2, float, P> unpack(vec<2, uint16, P> const& v) { i16vec2 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); @@ -316,7 +316,7 @@ namespace detail template 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) { vec<3, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z)); u16vec3 Packed; @@ -324,7 +324,7 @@ namespace detail return Packed; } - GLM_FUNC_QUALIFIER static vec<3, float, P> unpack(vec<3, uint16, P> const & v) + GLM_FUNC_QUALIFIER static vec<3, float, P> unpack(vec<3, uint16, P> const& v) { i16vec3 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); @@ -335,7 +335,7 @@ namespace detail template 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) { vec<4, int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w)); u16vec4 Packed; @@ -343,7 +343,7 @@ namespace detail return Packed; } - GLM_FUNC_QUALIFIER static vec<4, float, P> unpack(vec<4, uint16, P> const & v) + GLM_FUNC_QUALIFIER static vec<4, float, P> unpack(vec<4, uint16, P> const& v) { i16vec4 Unpack; memcpy(&Unpack, &v, sizeof(Unpack)); @@ -363,7 +363,7 @@ namespace detail return Unpack * static_cast(0.0039215686274509803921568627451); // 1 / 255 } - GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v) + GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const& v) { u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f)); @@ -396,7 +396,7 @@ namespace detail -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v) + GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const& v) { i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f)); uint16 Packed = 0; @@ -424,7 +424,7 @@ namespace detail return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 } - GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const& v) { u16vec4 const Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f)); uint64 Packed = 0; @@ -456,7 +456,7 @@ namespace detail -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const& v) { i16vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); uint64 Packed = 0; @@ -488,7 +488,7 @@ namespace detail return detail::toFloat32(Unpack); } - GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v) + GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const& v) { i16vec4 const Unpack( detail::toFloat16(v.x), @@ -511,7 +511,7 @@ namespace detail detail::toFloat32(Unpack.w)); } - GLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v) + GLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const& v) { detail::i10i10i10i2 Result; Result.data.x = v.x; @@ -532,7 +532,7 @@ namespace detail Unpack.data.w); } - GLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v) + GLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const& v) { detail::u10u10u10u2 Result; Result.data.x = v.x; @@ -553,7 +553,7 @@ namespace detail Unpack.data.w); } - GLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v) + GLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const& v) { ivec4 const Pack(round(clamp(v,-1.0f, 1.0f) * vec4(511.f, 511.f, 511.f, 1.f))); @@ -575,7 +575,7 @@ namespace detail return clamp(Result * vec4(1.f / 511.f, 1.f / 511.f, 1.f / 511.f, 1.f), -1.0f, 1.0f); } - GLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v) + GLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const& v) { uvec4 const Unpack(round(clamp(v, 0.0f, 1.0f) * vec4(1023.f, 1023.f, 1023.f, 3.f))); @@ -596,7 +596,7 @@ namespace detail return vec4(Unpack.data.x, Unpack.data.y, Unpack.data.z, Unpack.data.w) * ScaleFactors; } - GLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v) + GLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const& v) { return ((detail::floatTo11bit(v.x) & ((1 << 11) - 1)) << 0) | @@ -612,7 +612,7 @@ namespace detail detail::packed10bitToFloat(v >> 22)); } - GLM_FUNC_QUALIFIER uint32 packF3x9_E1x5(vec3 const & v) + GLM_FUNC_QUALIFIER uint32 packF3x9_E1x5(vec3 const& v) { float const SharedExpMax = (pow(2.0f, 9.0f - 1.0f) / pow(2.0f, 9.0f)) * pow(2.0f, 31.f - 15.f); vec3 const Color = clamp(v, 0.0f, SharedExpMax); @@ -642,7 +642,7 @@ namespace detail // Based on Brian Karis http://graphicrants.blogspot.fr/2009/04/rgbm-color-encoding.html template - 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(1.0 / 6.0)); T Alpha = clamp(max(max(Color.x, Color.y), max(Color.z, static_cast(1e-6))), static_cast(0), static_cast(1)); @@ -651,19 +651,19 @@ namespace detail } template - 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(6); } template - GLM_FUNC_QUALIFIER vec packHalf(vec const & v) + GLM_FUNC_QUALIFIER vec packHalf(vec const& v) { return detail::compute_half::pack(v); } template - GLM_FUNC_QUALIFIER vec unpackHalf(vec const & v) + GLM_FUNC_QUALIFIER vec unpackHalf(vec const& v) { return detail::compute_half::unpack(v); } @@ -687,7 +687,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec packSnorm(vec const & v) + GLM_FUNC_QUALIFIER vec packSnorm(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); @@ -696,7 +696,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec unpackSnorm(vec const & v) + GLM_FUNC_QUALIFIER vec unpackSnorm(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "uintType must be an integer type"); GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "floatType must be a floating point type"); @@ -704,7 +704,7 @@ namespace detail return clamp(vec(v) * (static_cast(1) / static_cast(std::numeric_limits::max())), static_cast(-1), static_cast(1)); } - GLM_FUNC_QUALIFIER uint8 packUnorm2x4(vec2 const & v) + GLM_FUNC_QUALIFIER uint8 packUnorm2x4(vec2 const& v) { u32vec2 const Unpack(round(clamp(v, 0.0f, 1.0f) * 15.0f)); detail::u4u4 Result; @@ -721,7 +721,7 @@ namespace detail return vec2(Unpack.data.x, Unpack.data.y) * ScaleFactor; } - GLM_FUNC_QUALIFIER uint16 packUnorm4x4(vec4 const & v) + GLM_FUNC_QUALIFIER uint16 packUnorm4x4(vec4 const& v) { u32vec4 const Unpack(round(clamp(v, 0.0f, 1.0f) * 15.0f)); detail::u4u4u4u4 Result; @@ -740,7 +740,7 @@ namespace detail return vec4(Unpack.data.x, Unpack.data.y, Unpack.data.z, Unpack.data.w) * ScaleFactor; } - GLM_FUNC_QUALIFIER uint16 packUnorm1x5_1x6_1x5(vec3 const & v) + GLM_FUNC_QUALIFIER uint16 packUnorm1x5_1x6_1x5(vec3 const& v) { u32vec3 const Unpack(round(clamp(v, 0.0f, 1.0f) * vec3(31.f, 63.f, 31.f))); detail::u5u6u5 Result; @@ -758,7 +758,7 @@ namespace detail return vec3(Unpack.data.x, Unpack.data.y, Unpack.data.z) * ScaleFactor; } - GLM_FUNC_QUALIFIER uint16 packUnorm3x5_1x1(vec4 const & v) + GLM_FUNC_QUALIFIER uint16 packUnorm3x5_1x1(vec4 const& v) { u32vec4 const Unpack(round(clamp(v, 0.0f, 1.0f) * vec4(31.f, 31.f, 31.f, 1.f))); detail::u5u5u5u1 Result; @@ -777,7 +777,7 @@ namespace detail return vec4(Unpack.data.x, Unpack.data.y, Unpack.data.z, Unpack.data.w) * ScaleFactor; } - GLM_FUNC_QUALIFIER uint8 packUnorm2x3_1x2(vec3 const & v) + GLM_FUNC_QUALIFIER uint8 packUnorm2x3_1x2(vec3 const& v) { u32vec3 const Unpack(round(clamp(v, 0.0f, 1.0f) * vec3(7.f, 7.f, 3.f))); detail::u3u3u2 Result; diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 694f0d2e..b343f130 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -73,7 +73,7 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 4;} GLM_FUNC_DECL T & operator[](length_type i); - GLM_FUNC_DECL T const & operator[](length_type i) const; + GLM_FUNC_DECL T const& operator[](length_type i) const; // -- Implicit basic constructors -- @@ -104,7 +104,7 @@ namespace glm /// @param v A second normalized axis /// @see gtc_quaternion /// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors - GLM_FUNC_DECL tquat(vec<3, T, P> const & u, vec<3, T, P> const & v); + GLM_FUNC_DECL tquat(vec<3, T, P> const& u, vec<3, T, P> const& v); /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. GLM_FUNC_DECL GLM_EXPLICIT tquat(vec<3, T, P> const& eulerAngles); @@ -140,39 +140,39 @@ namespace glm // -- Binary operators -- template - GLM_FUNC_DECL tquat operator+(tquat const & q, tquat const & p); + GLM_FUNC_DECL tquat operator+(tquat const& q, tquat const& p); template - GLM_FUNC_DECL tquat operator*(tquat const & q, tquat const & p); + GLM_FUNC_DECL tquat operator*(tquat const& q, tquat const& p); template - GLM_FUNC_DECL vec<3, T, P> operator*(tquat const & q, vec<3, T, P> const & v); + GLM_FUNC_DECL vec<3, T, P> operator*(tquat const& q, vec<3, T, P> const& v); template - GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tquat const & q); + GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const& v, tquat const& q); template - GLM_FUNC_DECL vec<4, T, P> operator*(tquat const & q, vec<4, T, P> const & v); + GLM_FUNC_DECL vec<4, T, P> operator*(tquat const& q, vec<4, T, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tquat const & q); + GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const& v, tquat const& q); template - GLM_FUNC_DECL tquat operator*(tquat const & q, T const & s); + GLM_FUNC_DECL tquat operator*(tquat const& q, T const& s); template - GLM_FUNC_DECL tquat operator*(T const & s, tquat const & q); + GLM_FUNC_DECL tquat operator*(T const& s, tquat const& q); template - GLM_FUNC_DECL tquat operator/(tquat const & q, T const & s); + GLM_FUNC_DECL tquat operator/(tquat const& q, T const& s); // -- Boolean operators -- template - GLM_FUNC_DECL bool operator==(tquat const & q1, tquat const & q2); + GLM_FUNC_DECL bool operator==(tquat const& q1, tquat const& q2); template - GLM_FUNC_DECL bool operator!=(tquat const & q1, tquat const & q2); + GLM_FUNC_DECL bool operator!=(tquat const& q1, tquat const& q2); /// Returns the length of the quaternion. /// @@ -180,7 +180,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL T length(tquat const & q); + GLM_FUNC_DECL T length(tquat const& q); /// Returns the normalized quaternion. /// @@ -188,7 +188,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat normalize(tquat const & q); + GLM_FUNC_DECL tquat normalize(tquat const& q); /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... /// @@ -196,7 +196,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL T dot(tquat const & x, tquat const & y); + GLM_FUNC_DECL T dot(tquat const& x, tquat const& y); /// Spherical linear interpolation of two quaternions. /// The interpolation is oriented and the rotation is performed at constant speed. @@ -207,10 +207,10 @@ namespace glm /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. /// @tparam T Floating-point scalar types. /// - /// @see - slerp(tquat const & x, tquat const & y, T const & a) + /// @see - slerp(tquat const& x, tquat const& y, T const& a) /// @see gtc_quaternion template - GLM_FUNC_DECL tquat mix(tquat const & x, tquat const & y, T a); + GLM_FUNC_DECL tquat mix(tquat const& x, tquat const& y, T a); /// Linear interpolation of two quaternions. /// The interpolation is oriented. @@ -222,7 +222,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat lerp(tquat const & x, tquat const & y, T a); + GLM_FUNC_DECL tquat lerp(tquat const& x, tquat const& y, T a); /// Spherical linear interpolation of two quaternions. /// The interpolation always take the short path and the rotation is performed at constant speed. @@ -234,7 +234,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat slerp(tquat const & x, tquat const & y, T a); + GLM_FUNC_DECL tquat slerp(tquat const& x, tquat const& y, T a); /// Returns the q conjugate. /// @@ -242,7 +242,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat conjugate(tquat const & q); + GLM_FUNC_DECL tquat conjugate(tquat const& q); /// Returns the q inverse. /// @@ -250,7 +250,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat inverse(tquat const & q); + GLM_FUNC_DECL tquat inverse(tquat const& q); /// Rotates a quaternion from a vector of 3 components axis and an angle. /// @@ -261,7 +261,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL tquat rotate(tquat const & q, T const & angle, vec<3, T, P> const & axis); + GLM_FUNC_DECL tquat rotate(tquat const& q, T const& angle, vec<3, T, P> const& axis); /// Returns euler angles, pitch as x, yaw as y, roll as z. /// The result is expressed in radians. @@ -270,7 +270,7 @@ namespace glm /// /// @see gtc_quaternion template - GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat const & x); + GLM_FUNC_DECL vec<3, T, P> eulerAngles(tquat const& x); /// Returns roll value of euler angles expressed in radians. /// diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index b96a5cf7..f8bd4545 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -60,7 +60,7 @@ namespace detail template struct compute_quat_mul_vec4 { - static vec<4, T, P> call(tquat const & q, vec<4, T, P> const & v) + static vec<4, T, P> call(tquat const& q, vec<4, T, P> const& v) { return vec<4, T, P>(q * vec<3, T, P>(v), v.w); } @@ -77,7 +77,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER T const & tquat::operator[](typename tquat::length_type i) const + GLM_FUNC_QUALIFIER T const& tquat::operator[](typename tquat::length_type i) const { assert(i >= 0 && i < this->length()); return (&x)[i]; @@ -93,7 +93,7 @@ namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat::tquat(tquat const & q) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tquat::tquat(tquat const& q) : x(q.x), y(q.y), z(q.z), w(q.w) {} # endif//!GLM_HAS_DEFAULTED_FUNCTIONS @@ -130,9 +130,9 @@ namespace detail //template //GLM_FUNC_QUALIFIER tquat::tquat //( - // valType const & pitch, - // valType const & yaw, - // valType const & roll + // valType const& pitch, + // valType const& yaw, + // valType const& roll //) //{ // vec<3, valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); @@ -200,7 +200,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat inverse(tquat const & q) + GLM_FUNC_QUALIFIER tquat inverse(tquat const& q) { return conjugate(q) / dot(q, q); } @@ -209,7 +209,7 @@ namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template - GLM_FUNC_QUALIFIER tquat & tquat::operator=(tquat const & q) + GLM_FUNC_QUALIFIER tquat & tquat::operator=(tquat const& q) { this->w = q.w; this->x = q.x; @@ -221,7 +221,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tquat & tquat::operator=(tquat const & q) + GLM_FUNC_QUALIFIER tquat & tquat::operator=(tquat const& q) { this->w = static_cast(q.w); this->x = static_cast(q.x); @@ -246,7 +246,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER tquat & tquat::operator*=(tquat const & r) + GLM_FUNC_QUALIFIER tquat & tquat::operator*=(tquat const& r) { tquat const p(*this); tquat const q(r); @@ -275,13 +275,13 @@ namespace detail // -- Unary bit operators -- template - GLM_FUNC_QUALIFIER tquat operator+(tquat const & q) + GLM_FUNC_QUALIFIER tquat operator+(tquat const& q) { return q; } template - GLM_FUNC_QUALIFIER tquat operator-(tquat const & q) + GLM_FUNC_QUALIFIER tquat operator-(tquat const& q) { return tquat(-q.w, -q.x, -q.y, -q.z); } @@ -289,19 +289,19 @@ namespace detail // -- Binary operators -- template - GLM_FUNC_QUALIFIER tquat operator+(tquat const & q, tquat const & p) + GLM_FUNC_QUALIFIER tquat operator+(tquat const& q, tquat const& p) { return tquat(q) += p; } template - GLM_FUNC_QUALIFIER tquat operator*(tquat const & q, tquat const & p) + GLM_FUNC_QUALIFIER tquat operator*(tquat const& q, tquat const& p) { return tquat(q) *= p; } template - GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat const & q, vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tquat 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 uv(glm::cross(QuatVector, v)); @@ -311,7 +311,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tquat const & q) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const& v, tquat const& q) { return glm::inverse(q) * v; } @@ -323,26 +323,26 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tquat const & q) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const& v, tquat const& q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tquat operator*(tquat const & q, T const & s) + GLM_FUNC_QUALIFIER tquat operator*(tquat const& q, T const& s) { return tquat( q.w * s, q.x * s, q.y * s, q.z * s); } template - GLM_FUNC_QUALIFIER tquat operator*(T const & s, tquat const & q) + GLM_FUNC_QUALIFIER tquat operator*(T const& s, tquat const& q) { return q * s; } template - GLM_FUNC_QUALIFIER tquat operator/(tquat const & q, T const & s) + GLM_FUNC_QUALIFIER tquat operator/(tquat const& q, T const& s) { return tquat( q.w / s, q.x / s, q.y / s, q.z / s); @@ -351,13 +351,13 @@ namespace detail // -- Boolean operators -- template - GLM_FUNC_QUALIFIER bool operator==(tquat const & q1, tquat const & q2) + GLM_FUNC_QUALIFIER bool operator==(tquat const& q1, tquat const& q2) { return all(epsilonEqual(q1, q2, epsilon())); } template - GLM_FUNC_QUALIFIER bool operator!=(tquat const & q1, tquat const & q2) + GLM_FUNC_QUALIFIER bool operator!=(tquat const& q1, tquat const& q2) { return any(epsilonNotEqual(q1, q2, epsilon())); } @@ -365,13 +365,13 @@ namespace detail // -- Operations -- template - GLM_FUNC_QUALIFIER T length(tquat const & q) + GLM_FUNC_QUALIFIER T length(tquat const& q) { return glm::sqrt(dot(q, q)); } template - GLM_FUNC_QUALIFIER tquat normalize(tquat const & q) + GLM_FUNC_QUALIFIER tquat normalize(tquat const& q) { T len = length(q); if(len <= T(0)) // Problem @@ -381,7 +381,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat cross(tquat const & q1, tquat const & q2) + GLM_FUNC_QUALIFIER tquat cross(tquat const& q1, tquat const& q2) { return tquat( q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, @@ -392,7 +392,7 @@ namespace detail /* // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) template - GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T const & a) + GLM_FUNC_QUALIFIER tquat mix(tquat const& x, tquat const& y, T const& a) { if(a <= T(0)) return x; if(a >= T(1)) return y; @@ -431,9 +431,9 @@ namespace detail template GLM_FUNC_QUALIFIER tquat mix2 ( - tquat const & x, - tquat const & y, - T const & a + tquat const& x, + tquat const& y, + T const& a ) { bool flip = false; @@ -467,7 +467,7 @@ namespace detail */ template - GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T a) + GLM_FUNC_QUALIFIER tquat mix(tquat const& x, tquat const& y, T a) { T cosTheta = dot(x, y); @@ -490,7 +490,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat lerp(tquat const & x, tquat const & y, T a) + GLM_FUNC_QUALIFIER tquat lerp(tquat const& x, tquat const& y, T a) { // Lerp is only defined in [0, 1] assert(a >= static_cast(0)); @@ -500,7 +500,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat slerp(tquat const & x, tquat const & y, T a) + GLM_FUNC_QUALIFIER tquat slerp(tquat const& x, tquat const& y, T a) { tquat z = y; @@ -533,7 +533,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat rotate(tquat const & q, T const & angle, vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER tquat rotate(tquat const& q, T const& angle, vec<3, T, P> const& v) { vec<3, T, P> Tmp = v; @@ -555,19 +555,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> eulerAngles(tquat const& x) { return vec<3, T, P>(pitch(x), yaw(x), roll(x)); } template - GLM_FUNC_QUALIFIER T roll(tquat const & q) + GLM_FUNC_QUALIFIER T roll(tquat const& q) { return static_cast(atan(static_cast(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 - GLM_FUNC_QUALIFIER T pitch(tquat const & q) + GLM_FUNC_QUALIFIER T pitch(tquat 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)); const T y = static_cast(2) * (q.y * q.z + q.w * q.x); @@ -580,13 +580,13 @@ namespace detail } template - GLM_FUNC_QUALIFIER T yaw(tquat const & q) + GLM_FUNC_QUALIFIER T yaw(tquat const& q) { return asin(clamp(static_cast(-2) * (q.x * q.z - q.w * q.y), static_cast(-1), static_cast(1))); } template - GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat3_cast(tquat const & q) + GLM_FUNC_QUALIFIER mat<3, 3, T, P> mat3_cast(tquat const& q) { mat<3, 3, T, P> Result(T(1)); T qxx(q.x * q.x); @@ -614,13 +614,13 @@ namespace detail } template - GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat4_cast(tquat const & q) + GLM_FUNC_QUALIFIER mat<4, 4, T, P> mat4_cast(tquat const& q) { return mat<4, 4, T, P>(mat3_cast(q)); } template - GLM_FUNC_QUALIFIER tquat quat_cast(mat<3, 3, T, P> const & m) + GLM_FUNC_QUALIFIER tquat quat_cast(mat<3, 3, T, P> const& m) { T fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; T fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2]; @@ -684,19 +684,19 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat quat_cast(mat<4, 4, T, P> const & m4) + GLM_FUNC_QUALIFIER tquat quat_cast(mat<4, 4, T, P> const& m4) { return quat_cast(mat<3, 3, T, P>(m4)); } template - GLM_FUNC_QUALIFIER T angle(tquat const & x) + GLM_FUNC_QUALIFIER T angle(tquat const& x) { return acos(x.w) * static_cast(2); } template - GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat const & x) + GLM_FUNC_QUALIFIER vec<3, T, P> axis(tquat const& x) { T tmp1 = static_cast(1) - x.w * x.w; if(tmp1 <= static_cast(0)) @@ -706,7 +706,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat angleAxis(T const & angle, vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER tquat angleAxis(T const& angle, vec<3, T, P> const& v) { tquat Result; @@ -721,7 +721,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> lessThan(tquat const& x, tquat const& y) { vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) @@ -730,7 +730,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> lessThanEqual(tquat const& x, tquat const& y) { vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) @@ -739,7 +739,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThan(tquat const& x, tquat const& y) { vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) @@ -748,7 +748,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat const & x, tquat const & y) + GLM_FUNC_QUALIFIER vec<4, bool, P> greaterThanEqual(tquat const& x, tquat const& y) { vec<4, bool, P> Result; for(length_t i = 0; i < x.length(); ++i) diff --git a/glm/gtc/quaternion_simd.inl b/glm/gtc/quaternion_simd.inl index 262e0235..14f67c07 100644 --- a/glm/gtc/quaternion_simd.inl +++ b/glm/gtc/quaternion_simd.inl @@ -85,7 +85,7 @@ namespace detail template struct compute_quat_add { - static tquat call(tquat const & a, tquat const & b) + static tquat call(tquat const& a, tquat const& b) { tquat Result; Result.data = _mm256_add_pd(a.data, b.data); @@ -109,7 +109,7 @@ namespace detail template struct compute_quat_sub { - static tquat call(tquat const & a, tquat const & b) + static tquat call(tquat const& a, tquat const& b) { tquat Result; Result.data = _mm256_sub_pd(a.data, b.data); diff --git a/glm/gtc/random.inl b/glm/gtc/random.inl index c1cb84de..f0939bf0 100644 --- a/glm/gtc/random.inl +++ b/glm/gtc/random.inl @@ -142,7 +142,7 @@ namespace detail template struct compute_linearRand { - GLM_FUNC_QUALIFIER static vec call(vec const & Min, vec const& Max) + GLM_FUNC_QUALIFIER static vec call(vec const& Min, vec const& Max) { return (vec(compute_rand::call() % vec(Max + static_cast(1) - Min))) + Min; } @@ -266,7 +266,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec linearRand(vec const & Min, vec const& Max) + GLM_FUNC_QUALIFIER vec linearRand(vec const& Min, vec const& Max) { return detail::compute_linearRand::call(Min, Max); } diff --git a/glm/gtc/reciprocal.inl b/glm/gtc/reciprocal.inl index 8b7a8878..f18fafda 100644 --- a/glm/gtc/reciprocal.inl +++ b/glm/gtc/reciprocal.inl @@ -15,7 +15,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec sec(vec const & x) + GLM_FUNC_QUALIFIER vec sec(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sec' only accept floating-point inputs"); return detail::functor1::call(sec, x); @@ -30,7 +30,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec csc(vec const & x) + GLM_FUNC_QUALIFIER vec csc(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csc' only accept floating-point inputs"); return detail::functor1::call(csc, x); @@ -47,7 +47,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec cot(vec const & x) + GLM_FUNC_QUALIFIER vec cot(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cot' only accept floating-point inputs"); return detail::functor1::call(cot, x); @@ -62,7 +62,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec asec(vec const & x) + GLM_FUNC_QUALIFIER vec asec(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asec' only accept floating-point inputs"); return detail::functor1::call(asec, x); @@ -77,7 +77,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec acsc(vec const & x) + GLM_FUNC_QUALIFIER vec acsc(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsc' only accept floating-point inputs"); return detail::functor1::call(acsc, x); @@ -94,7 +94,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec acot(vec const & x) + GLM_FUNC_QUALIFIER vec acot(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acot' only accept floating-point inputs"); return detail::functor1::call(acot, x); @@ -109,7 +109,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec sech(vec const & x) + GLM_FUNC_QUALIFIER vec sech(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sech' only accept floating-point inputs"); return detail::functor1::call(sech, x); @@ -124,7 +124,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec csch(vec const & x) + GLM_FUNC_QUALIFIER vec csch(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csch' only accept floating-point inputs"); return detail::functor1::call(csch, x); @@ -139,7 +139,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec coth(vec const & x) + GLM_FUNC_QUALIFIER vec coth(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'coth' only accept floating-point inputs"); return detail::functor1::call(coth, x); @@ -154,7 +154,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec asech(vec const & x) + GLM_FUNC_QUALIFIER vec asech(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asech' only accept floating-point inputs"); return detail::functor1::call(asech, x); @@ -169,7 +169,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec acsch(vec const & x) + GLM_FUNC_QUALIFIER vec acsch(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsch' only accept floating-point inputs"); return detail::functor1::call(acsch, x); @@ -184,7 +184,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec acoth(vec const & x) + GLM_FUNC_QUALIFIER vec acoth(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acoth' only accept floating-point inputs"); return detail::functor1::call(acoth, x); diff --git a/glm/gtc/round.hpp b/glm/gtc/round.hpp index 6b5b6e20..b6afd3d8 100644 --- a/glm/gtc/round.hpp +++ b/glm/gtc/round.hpp @@ -116,7 +116,7 @@ namespace glm /// /// @see gtc_round template - GLM_FUNC_DECL vec ceilMultiple(vec const & Source, vec const& Multiple); + GLM_FUNC_DECL vec ceilMultiple(vec const& Source, vec const& Multiple); /// Lower multiple number of Source. /// diff --git a/glm/gtc/round.inl b/glm/gtc/round.inl index 5fda25fd..c1313a55 100644 --- a/glm/gtc/round.inl +++ b/glm/gtc/round.inl @@ -220,7 +220,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec isPowerOfTwo(vec const & Value) + GLM_FUNC_QUALIFIER vec isPowerOfTwo(vec const& Value) { vec const Result(abs(Value)); return equal(Result & (Result - 1), vec(0)); @@ -251,7 +251,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec floorPowerOfTwo(vec const & v) + GLM_FUNC_QUALIFIER vec floorPowerOfTwo(vec const& v) { return detail::functor1::call(floorPowerOfTwo, v); } @@ -271,7 +271,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec roundPowerOfTwo(vec const & v) + GLM_FUNC_QUALIFIER vec roundPowerOfTwo(vec const& v) { return detail::functor1::call(roundPowerOfTwo, v); } @@ -286,7 +286,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec isMultiple(vec const & Value, T Multiple) + GLM_FUNC_QUALIFIER vec isMultiple(vec const& Value, T Multiple) { return (Value % Multiple) == vec(0); } diff --git a/glm/gtc/ulp.hpp b/glm/gtc/ulp.hpp index 2f41bb65..b9c6a6c4 100644 --- a/glm/gtc/ulp.hpp +++ b/glm/gtc/ulp.hpp @@ -31,32 +31,32 @@ namespace glm /// Return the next ULP value(s) after the input value(s). /// @see gtc_ulp template - GLM_FUNC_DECL genType next_float(genType const & x); + GLM_FUNC_DECL genType next_float(genType const& x); /// Return the previous ULP value(s) before the input value(s). /// @see gtc_ulp template - GLM_FUNC_DECL genType prev_float(genType const & x); + GLM_FUNC_DECL genType prev_float(genType const& x); /// Return the value(s) ULP distance after the input value(s). /// @see gtc_ulp template - GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance); + GLM_FUNC_DECL genType next_float(genType const& x, uint const& Distance); /// Return the value(s) ULP distance before the input value(s). /// @see gtc_ulp template - GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance); + GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance); /// Return the distance in the number of ULP between 2 scalars. /// @see gtc_ulp template - GLM_FUNC_DECL uint float_distance(T const & x, T const & y); + GLM_FUNC_DECL uint float_distance(T const& x, T const& y); /// Return the distance in the number of ULP between 2 vectors. /// @see gtc_ulp template - GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const & x, vec<2, T, Q> const & y); + GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y); /// @} }// namespace glm diff --git a/glm/gtc/ulp.inl b/glm/gtc/ulp.inl index 5019287a..a1be841a 100644 --- a/glm/gtc/ulp.inl +++ b/glm/gtc/ulp.inl @@ -190,7 +190,7 @@ namespace detail namespace glm { template<> - GLM_FUNC_QUALIFIER float next_float(float const & x) + GLM_FUNC_QUALIFIER float next_float(float const& x) { # if GLM_HAS_CXX11_STL return std::nextafter(x, std::numeric_limits::max()); @@ -204,7 +204,7 @@ namespace glm } template<> - GLM_FUNC_QUALIFIER double next_float(double const & x) + GLM_FUNC_QUALIFIER double next_float(double const& x) { # if GLM_HAS_CXX11_STL return std::nextafter(x, std::numeric_limits::max()); @@ -218,7 +218,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec next_float(vec const & x) + GLM_FUNC_QUALIFIER vec next_float(vec const& x) { vec Result; for(length_t i = 0, n = Result.length(); i < n; ++i) @@ -226,7 +226,7 @@ namespace glm return Result; } - GLM_FUNC_QUALIFIER float prev_float(float const & x) + GLM_FUNC_QUALIFIER float prev_float(float const& x) { # if GLM_HAS_CXX11_STL return std::nextafter(x, std::numeric_limits::min()); @@ -239,7 +239,7 @@ namespace glm # endif } - GLM_FUNC_QUALIFIER double prev_float(double const & x) + GLM_FUNC_QUALIFIER double prev_float(double const& x) { # if GLM_HAS_CXX11_STL return std::nextafter(x, std::numeric_limits::min()); @@ -253,7 +253,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec prev_float(vec const & x) + GLM_FUNC_QUALIFIER vec prev_float(vec const& x) { vec Result; for(length_t i = 0, n = Result.length(); i < n; ++i) @@ -262,7 +262,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps) + GLM_FUNC_QUALIFIER T next_float(T const& x, uint const& ulps) { T temp = x; for(uint i = 0; i < ulps; ++i) @@ -271,7 +271,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec next_float(vec const & x, vec const & ulps) + GLM_FUNC_QUALIFIER vec next_float(vec const& x, vec const& ulps) { vec Result; for(length_t i = 0, n = Result.length(); i < n; ++i) @@ -280,7 +280,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps) + GLM_FUNC_QUALIFIER T prev_float(T const& x, uint const& ulps) { T temp = x; for(uint i = 0; i < ulps; ++i) @@ -289,7 +289,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec prev_float(vec const & x, vec const & ulps) + GLM_FUNC_QUALIFIER vec prev_float(vec const& x, vec const& ulps) { vec Result; for(length_t i = 0, n = Result.length(); i < n; ++i) @@ -298,7 +298,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y) + GLM_FUNC_QUALIFIER uint float_distance(T const& x, T const& y) { uint ulp = 0; @@ -329,7 +329,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec float_distance(vec const & x, vec const & y) + GLM_FUNC_QUALIFIER vec float_distance(vec const& x, vec const& y) { vec Result; for(length_t i = 0, n = Result.length(); i < n; ++i) diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index ce07b1db..8b163e4f 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -37,8 +37,8 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec<2, U, P> associatedMin( - vec const& x, vec const & a, - vec const& y, vec const & b); + vec const& x, vec const& a, + vec const& y, vec const& b); /// Minimum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max @@ -66,9 +66,9 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMin( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c); + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c); /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -83,19 +83,19 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMin( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c, - vec const& w, vec const & d); + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c, + vec const& w, vec const& d); /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMin( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c, - T w, vec const & d); + T x, vec const& a, + T y, vec const& b, + T z, vec const& c, + T w, vec const& d); /// Minimum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max @@ -115,15 +115,15 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec<2, U, P> associatedMax( - vec const& x, vec const & a, - vec const& y, vec const & b); + vec const& x, vec const& a, + vec const& y, vec const& b); /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMax( - T x, vec const & a, - T y, vec const & b); + T x, vec const& a, + T y, vec const& b); /// Maximum comparison between 2 variables and returns 2 associated variable values /// @see gtx_associated_min_max @@ -144,17 +144,17 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMax( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c); + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c); /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMax( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c); + T x, vec const& a, + T y, vec const& b, + T z, vec const& c); /// Maximum comparison between 3 variables and returns 3 associated variable values /// @see gtx_associated_min_max @@ -177,19 +177,19 @@ namespace glm /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMax( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c, - vec const& w, vec const & d); + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c, + vec const& w, vec const& d); /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max template GLM_FUNC_DECL vec associatedMax( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c, - T w, vec const & d); + T x, vec const& a, + T y, vec const& b, + T z, vec const& c, + T w, vec const& d); /// Maximum comparison between 4 variables and returns 4 associated variable values /// @see gtx_associated_min_max diff --git a/glm/gtx/associated_min_max.inl b/glm/gtx/associated_min_max.inl index a5a32f4a..16b808f1 100644 --- a/glm/gtx/associated_min_max.inl +++ b/glm/gtx/associated_min_max.inl @@ -13,8 +13,8 @@ GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) template GLM_FUNC_QUALIFIER vec<2, U, P> associatedMin ( - vec const& x, vec const & a, - vec const& y, vec const & b + vec const& x, vec const& a, + vec const& y, vec const& b ) { vec Result; @@ -65,9 +65,9 @@ GLM_FUNC_QUALIFIER U associatedMin template GLM_FUNC_QUALIFIER vec associatedMin ( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c ) { vec Result; @@ -98,10 +98,10 @@ GLM_FUNC_QUALIFIER U associatedMin template GLM_FUNC_QUALIFIER vec associatedMin ( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c, - vec const& w, vec const & d + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c, + vec const& w, vec const& d ) { vec Result; @@ -120,10 +120,10 @@ GLM_FUNC_QUALIFIER vec associatedMin template GLM_FUNC_QUALIFIER vec associatedMin ( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c, - T w, vec const & d + T x, vec const& a, + T y, vec const& b, + T z, vec const& c, + T w, vec const& d ) { T Test1 = min(x, y); @@ -172,8 +172,8 @@ GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) template GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax ( - vec const& x, vec const & a, - vec const& y, vec const & b + vec const& x, vec const& a, + vec const& y, vec const& b ) { vec Result; @@ -186,8 +186,8 @@ GLM_FUNC_QUALIFIER vec<2, U, P> associatedMax template GLM_FUNC_QUALIFIER vec associatedMax ( - T x, vec const & a, - T y, vec const & b + T x, vec const& a, + T y, vec const& b ) { vec Result; @@ -227,9 +227,9 @@ GLM_FUNC_QUALIFIER U associatedMax template GLM_FUNC_QUALIFIER vec associatedMax ( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c ) { vec Result; @@ -242,9 +242,9 @@ GLM_FUNC_QUALIFIER vec associatedMax template GLM_FUNC_QUALIFIER vec associatedMax ( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c + T x, vec const& a, + T y, vec const& b, + T z, vec const& c ) { vec Result; @@ -290,10 +290,10 @@ GLM_FUNC_QUALIFIER U associatedMax template GLM_FUNC_QUALIFIER vec associatedMax ( - vec const& x, vec const & a, - vec const& y, vec const & b, - vec const& z, vec const & c, - vec const& w, vec const & d + vec const& x, vec const& a, + vec const& y, vec const& b, + vec const& z, vec const& c, + vec const& w, vec const& d ) { vec Result; @@ -312,10 +312,10 @@ GLM_FUNC_QUALIFIER vec associatedMax template GLM_FUNC_QUALIFIER vec associatedMax ( - T x, vec const & a, - T y, vec const & b, - T z, vec const & c, - T w, vec const & d + T x, vec const& a, + T y, vec const& b, + T z, vec const& c, + T w, vec const& d ) { T Test1 = max(x, y); diff --git a/glm/gtx/bit.inl b/glm/gtx/bit.inl index fa3b1e09..c2a09ee5 100644 --- a/glm/gtx/bit.inl +++ b/glm/gtx/bit.inl @@ -20,7 +20,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec highestBitValue(vec const & v) + GLM_FUNC_QUALIFIER vec highestBitValue(vec const& v) { return detail::functor1::call(highestBitValue, v); } diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index d4b8ed38..8bdca2f6 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -32,16 +32,16 @@ namespace glm /// @see gtx_closest_point template GLM_FUNC_DECL vec<3, T, P> closestPointOnLine( - vec<3, T, P> const & point, - vec<3, T, P> const & a, - vec<3, T, P> const & b); + vec<3, T, P> const& point, + vec<3, T, P> const& a, + vec<3, T, P> const& b); /// 2d lines work as well template GLM_FUNC_DECL vec<2, T, P> closestPointOnLine( - vec<2, T, P> const & point, - vec<2, T, P> const & a, - vec<2, T, P> const & b); + vec<2, T, P> const& point, + vec<2, T, P> const& a, + vec<2, T, P> const& b); /// @} }// namespace glm diff --git a/glm/gtx/closest_point.inl b/glm/gtx/closest_point.inl index 967d2a23..25563a71 100644 --- a/glm/gtx/closest_point.inl +++ b/glm/gtx/closest_point.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> closestPointOnLine ( - vec<3, T, P> const & point, - vec<3, T, P> const & a, - vec<3, T, P> const & b + vec<3, T, P> const& point, + vec<3, T, P> const& a, + vec<3, T, P> const& b ) { T LineLength = distance(a, b); @@ -26,9 +26,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<2, T, P> closestPointOnLine ( - vec<2, T, P> const & point, - vec<2, T, P> const & a, - vec<2, T, P> const & b + vec<2, T, P> const& point, + vec<2, T, P> const& a, + vec<2, T, P> const& b ) { T LineLength = distance(a, b); diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index d084c5d0..0db8f676 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -32,13 +32,13 @@ namespace glm /// @see gtx_color_space template 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. /// @see gtx_color_space template GLM_FUNC_DECL vec<3, T, P> hsvColor( - vec<3, T, P> const & rgbValue); + vec<3, T, P> const& rgbValue); /// Build a saturation matrix. /// @see gtx_color_space @@ -51,20 +51,20 @@ namespace glm template GLM_FUNC_DECL vec<3, T, P> saturation( T const s, - vec<3, T, P> const & color); + vec<3, T, P> const& color); /// Modify the saturation of a color. /// @see gtx_color_space template GLM_FUNC_DECL vec<4, T, P> saturation( 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. /// @see gtx_color_space template GLM_FUNC_DECL T luminosity( - vec<3, T, P> const & color); + vec<3, T, P> const& color); /// @} }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index e1235695..d21408ba 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -32,27 +32,27 @@ namespace glm /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL vec<3, T, P> rgb2YCoCg( - vec<3, T, P> const & rgbColor); + vec<3, T, P> const& rgbColor); /// Convert a color from YCoCg color space to RGB color space. /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL vec<3, T, P> YCoCg2rgb( - vec<3, T, P> const & YCoCgColor); + vec<3, T, P> const& YCoCgColor); /// Convert a color from RGB color space to YCoCgR color space. /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL vec<3, T, P> rgb2YCoCgR( - vec<3, T, P> const & rgbColor); + vec<3, T, P> const& rgbColor); /// Convert a color from YCoCgR color space to RGB color space. /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" /// @see gtx_color_space_YCoCg template GLM_FUNC_DECL vec<3, T, P> YCoCgR2rgb( - vec<3, T, P> const & YCoCgColor); + vec<3, T, P> const& YCoCgColor); /// @} }//namespace glm diff --git a/glm/gtx/color_space_YCoCg.inl b/glm/gtx/color_space_YCoCg.inl index 925a8477..f698dc85 100644 --- a/glm/gtx/color_space_YCoCg.inl +++ b/glm/gtx/color_space_YCoCg.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCg ( - vec<3, T, P> const & rgbColor + vec<3, T, P> const& rgbColor ) { vec<3, T, P> result; @@ -19,7 +19,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> YCoCg2rgb ( - vec<3, T, P> const & YCoCgColor + vec<3, T, P> const& YCoCgColor ) { vec<3, T, P> result; @@ -34,7 +34,7 @@ namespace glm public: static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - vec<3, T, P> const & rgbColor + vec<3, T, P> const& rgbColor ) { vec<3, T, P> result; @@ -46,7 +46,7 @@ namespace glm static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - vec<3, T, P> const & YCoCgRColor + vec<3, T, P> const& YCoCgRColor ) { vec<3, T, P> result; @@ -63,7 +63,7 @@ namespace glm public: static GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - vec<3, T, P> const & rgbColor + vec<3, T, P> const& rgbColor ) { vec<3, T, P> result; @@ -76,7 +76,7 @@ namespace glm static GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - vec<3, T, P> const & YCoCgRColor + vec<3, T, P> const& YCoCgRColor ) { vec<3, T, P> result; @@ -91,7 +91,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rgb2YCoCgR ( - vec<3, T, P> const & rgbColor + vec<3, T, P> const& rgbColor ) { return compute_YCoCgR::is_integer>::rgb2YCoCgR(rgbColor); @@ -100,7 +100,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> YCoCgR2rgb ( - vec<3, T, P> const & YCoCgRColor + vec<3, T, P> const& YCoCgRColor ) { return compute_YCoCgR::is_integer>::YCoCgR2rgb(YCoCgRColor); diff --git a/glm/gtx/common.hpp b/glm/gtx/common.hpp index fe1af0cc..c4eab57a 100644 --- a/glm/gtx/common.hpp +++ b/glm/gtx/common.hpp @@ -40,7 +40,7 @@ namespace glm /// @see GLSL isnan man page /// @see GLSL 4.20.8 specification, section 8.3 Common Functions template - GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x); + GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const& x); /// Similar to 'mod' but with a different rounding and integer support. /// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)' @@ -48,7 +48,7 @@ namespace glm /// @see GLSL mod vs HLSL fmod /// @see GLSL mod man page template - GLM_FUNC_DECL vec fmod(vec const & v); + GLM_FUNC_DECL vec fmod(vec const& v); /// @} }//namespace glm diff --git a/glm/gtx/common.inl b/glm/gtx/common.inl index 64eb254a..86712a69 100644 --- a/glm/gtx/common.inl +++ b/glm/gtx/common.inl @@ -11,7 +11,7 @@ namespace detail template struct compute_fmod { - GLM_FUNC_QUALIFIER static vec call(vec const & a, vec const & b) + GLM_FUNC_QUALIFIER static vec call(vec const& a, vec const& b) { return detail::functor2::call(std::fmod, a, b); } @@ -20,7 +20,7 @@ namespace detail template struct compute_fmod { - GLM_FUNC_QUALIFIER static vec call(vec const & a, vec const & b) + GLM_FUNC_QUALIFIER static vec call(vec const& a, vec const& b) { return a % b; } @@ -28,7 +28,7 @@ namespace detail }//namespace detail template - GLM_FUNC_QUALIFIER bool isdenormal(T const & x) + GLM_FUNC_QUALIFIER bool isdenormal(T const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -42,7 +42,7 @@ namespace detail template GLM_FUNC_QUALIFIER typename vec<1, T, P>::bool_type isdenormal ( - vec<1, T, P> const & x + vec<1, T, P> const& x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -54,7 +54,7 @@ namespace detail template GLM_FUNC_QUALIFIER typename vec<2, T, P>::bool_type isdenormal ( - vec<2, T, P> const & x + vec<2, T, P> const& x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -67,7 +67,7 @@ namespace detail template GLM_FUNC_QUALIFIER typename vec<3, T, P>::bool_type isdenormal ( - vec<3, T, P> const & x + vec<3, T, P> const& x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -81,7 +81,7 @@ namespace detail template GLM_FUNC_QUALIFIER typename vec<4, T, P>::bool_type isdenormal ( - vec<4, T, P> const & x + vec<4, T, P> const& x ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isdenormal' only accept floating-point inputs"); @@ -101,13 +101,13 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fmod(vec const & x, T y) + GLM_FUNC_QUALIFIER vec fmod(vec const& x, T y) { return detail::compute_fmod::is_iec559>::call(x, vec(y)); } template - GLM_FUNC_QUALIFIER vec fmod(vec const & x, vec const & y) + GLM_FUNC_QUALIFIER vec fmod(vec const& x, vec const& y) { return detail::compute_fmod::is_iec559>::call(x, y); } diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 6208a303..22169923 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -57,7 +57,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> atan2(const vec<3, T, P>& x, const vec<3, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template GLM_FUNC_QUALIFIER vec<4, T, P> atan2(const vec<4, T, P>& x, const vec<4, T, P>& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_DECL bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template GLM_FUNC_DECL bool isfinite(genType const& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template GLM_FUNC_DECL vec<1, bool, P> isfinite(const vec<1, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template GLM_FUNC_DECL vec<2, bool, P> isfinite(const vec<2, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) template GLM_FUNC_DECL vec<3, bool, P> isfinite(const vec<3, T, P>& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index bcbfc3e1..3f5de42f 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -8,7 +8,7 @@ namespace glm // isfinite template GLM_FUNC_QUALIFIER bool isfinite( - genType const & x) + genType const& x) { # if GLM_HAS_CXX11_STL return std::isfinite(x) != 0; @@ -26,7 +26,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<1, bool, P> isfinite( - vec<1, T, P> const & x) + vec<1, T, P> const& x) { return vec<1, bool, P>( isfinite(x.x)); @@ -34,7 +34,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<2, bool, P> isfinite( - vec<2, T, P> const & x) + vec<2, T, P> const& x) { return vec<2, bool, P>( isfinite(x.x), @@ -43,7 +43,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, bool, P> isfinite( - vec<3, T, P> const & x) + vec<3, T, P> const& x) { return vec<3, bool, P>( isfinite(x.x), @@ -53,7 +53,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, bool, P> isfinite( - vec<4, T, P> const & x) + vec<4, T, P> const& x) { return vec<4, bool, P>( isfinite(x.x), diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index 91a64823..d0b96983 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -35,33 +35,33 @@ namespace glm /// If the parameter value type is already a floating qualifier type, the value is passed through. /// @see gtx_component_wise template - GLM_FUNC_DECL vec compNormalize(vec const & v); + GLM_FUNC_DECL vec compNormalize(vec const& v); /// Convert a normalized float vector to an integer vector. /// If the parameter value type is already a floating qualifier type, the value is passed through. /// @see gtx_component_wise template - GLM_FUNC_DECL vec compScale(vec const & v); + GLM_FUNC_DECL vec compScale(vec const& v); /// Add all vector components together. /// @see gtx_component_wise template - GLM_FUNC_DECL typename genType::value_type compAdd(genType const & v); + GLM_FUNC_DECL typename genType::value_type compAdd(genType const& v); /// Multiply all vector components together. /// @see gtx_component_wise template - GLM_FUNC_DECL typename genType::value_type compMul(genType const & v); + GLM_FUNC_DECL typename genType::value_type compMul(genType const& v); /// Find the minimum value between single vector components. /// @see gtx_component_wise template - GLM_FUNC_DECL typename genType::value_type compMin(genType const & v); + GLM_FUNC_DECL typename genType::value_type compMin(genType const& v); /// Find the maximum value between single vector components. /// @see gtx_component_wise template - GLM_FUNC_DECL typename genType::value_type compMax(genType const & v); + GLM_FUNC_DECL typename genType::value_type compMax(genType const& v); /// @} }//namespace glm diff --git a/glm/gtx/component_wise.inl b/glm/gtx/component_wise.inl index 5fde73d2..b59dae65 100644 --- a/glm/gtx/component_wise.inl +++ b/glm/gtx/component_wise.inl @@ -13,7 +13,7 @@ namespace detail template struct compute_compNormalize { - GLM_FUNC_QUALIFIER static vec call(vec const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { floatType const Min = static_cast(std::numeric_limits::min()); floatType const Max = static_cast(std::numeric_limits::max()); @@ -24,7 +24,7 @@ namespace detail template struct compute_compNormalize { - GLM_FUNC_QUALIFIER static vec call(vec const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { return vec(v) / static_cast(std::numeric_limits::max()); } @@ -58,7 +58,7 @@ namespace detail template struct compute_compScale { - GLM_FUNC_QUALIFIER static vec call(vec const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { return vec(vec(v) * static_cast(std::numeric_limits::max())); } @@ -67,7 +67,7 @@ namespace detail template struct compute_compScale { - GLM_FUNC_QUALIFIER static vec call(vec const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { return v; } @@ -75,7 +75,7 @@ namespace detail }//namespace detail template - GLM_FUNC_QUALIFIER vec compNormalize(vec const & v) + GLM_FUNC_QUALIFIER vec compNormalize(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'compNormalize' accepts only floating-point types for 'floatType' template parameter"); @@ -83,7 +83,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec compScale(vec const & v) + GLM_FUNC_QUALIFIER vec compScale(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'compScale' accepts only floating-point types for 'floatType' template parameter"); @@ -100,7 +100,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER T compMul(vec const & v) + GLM_FUNC_QUALIFIER T compMul(vec const& v) { T Result(1); for(length_t i = 0, n = v.length(); i < n; ++i) @@ -109,7 +109,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER T compMin(vec const & v) + GLM_FUNC_QUALIFIER T compMin(vec const& v) { T Result(v[0]); for(length_t i = 1, n = v.length(); i < n; ++i) @@ -118,7 +118,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER T compMax(vec const & v) + GLM_FUNC_QUALIFIER T compMax(vec const& v) { T Result(v[0]); for(length_t i = 1, n = v.length(); i < n; ++i) diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index b49bf0e1..b9d28071 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -52,35 +52,35 @@ namespace glm GLM_FUNC_DECL static GLM_CONSTEXPR length_type length(){return 2;} GLM_FUNC_DECL part_type & operator[](length_type i); - GLM_FUNC_DECL part_type const & operator[](length_type i) const; + GLM_FUNC_DECL part_type const& operator[](length_type i) const; // -- Implicit basic constructors -- GLM_FUNC_DECL GLM_CONSTEXPR tdualquat() GLM_DEFAULT; - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat const & d) GLM_DEFAULT; + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat const& d) GLM_DEFAULT; template - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat const & d); + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tdualquat const& d); // -- Explicit basic constructors -- - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real); - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & orientation, vec<3, T, P> const & translation); - GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const & real, tquat const & dual); + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const& real); + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const& orientation, vec<3, T, P> const& translation); + GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(tquat const& real, tquat const& dual); // -- Conversion constructors -- template - GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat const & q); + GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(tdualquat const& q); - GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<2, 4, T, P> const & holder_mat); - GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<3, 4, T, P> const & aug_mat); + GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<2, 4, T, P> const& holder_mat); + GLM_FUNC_DECL GLM_EXPLICIT tdualquat(mat<3, 4, T, P> const& aug_mat); // -- Unary arithmetic operators -- - GLM_FUNC_DECL tdualquat & operator=(tdualquat const & m) GLM_DEFAULT; + GLM_FUNC_DECL tdualquat & operator=(tdualquat const& m) GLM_DEFAULT; template - GLM_FUNC_DECL tdualquat & operator=(tdualquat const & m); + GLM_FUNC_DECL tdualquat & operator=(tdualquat const& m); template GLM_FUNC_DECL tdualquat & operator*=(U s); template @@ -90,47 +90,47 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_DECL tdualquat operator+(tdualquat const & q); + GLM_FUNC_DECL tdualquat operator+(tdualquat const& q); template - GLM_FUNC_DECL tdualquat operator-(tdualquat const & q); + GLM_FUNC_DECL tdualquat operator-(tdualquat const& q); // -- Binary operators -- template - GLM_FUNC_DECL tdualquat operator+(tdualquat const & q, tdualquat const & p); + GLM_FUNC_DECL tdualquat operator+(tdualquat const& q, tdualquat const& p); template - GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, tdualquat const & p); + GLM_FUNC_DECL tdualquat operator*(tdualquat const& q, tdualquat const& p); template - GLM_FUNC_DECL vec<3, T, P> operator*(tdualquat const & q, vec<3, T, P> const & v); + GLM_FUNC_DECL vec<3, T, P> operator*(tdualquat const& q, vec<3, T, P> const& v); template - GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat const & q); + GLM_FUNC_DECL vec<3, T, P> operator*(vec<3, T, P> const& v, tdualquat const& q); template - GLM_FUNC_DECL vec<4, T, P> operator*(tdualquat const & q, vec<4, T, P> const & v); + GLM_FUNC_DECL vec<4, T, P> operator*(tdualquat const& q, vec<4, T, P> const& v); template - GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat const & q); + GLM_FUNC_DECL vec<4, T, P> operator*(vec<4, T, P> const& v, tdualquat const& q); template - GLM_FUNC_DECL tdualquat operator*(tdualquat const & q, T const & s); + GLM_FUNC_DECL tdualquat operator*(tdualquat const& q, T const& s); template - GLM_FUNC_DECL tdualquat operator*(T const & s, tdualquat const & q); + GLM_FUNC_DECL tdualquat operator*(T const& s, tdualquat const& q); template - GLM_FUNC_DECL tdualquat operator/(tdualquat const & q, T const & s); + GLM_FUNC_DECL tdualquat operator/(tdualquat const& q, T const& s); // -- Boolean operators -- template - GLM_FUNC_DECL bool operator==(tdualquat const & q1, tdualquat const & q2); + GLM_FUNC_DECL bool operator==(tdualquat const& q1, tdualquat const& q2); template - GLM_FUNC_DECL bool operator!=(tdualquat const & q1, tdualquat const & q2); + GLM_FUNC_DECL bool operator!=(tdualquat const& q1, tdualquat const& q2); /// Creates an identity dual quaternion. /// @@ -142,43 +142,43 @@ namespace glm /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL tdualquat normalize(tdualquat const & q); + GLM_FUNC_DECL tdualquat normalize(tdualquat const& q); /// Returns the linear interpolation of two dual quaternion. /// /// @see gtc_dual_quaternion template - GLM_FUNC_DECL tdualquat lerp(tdualquat const & x, tdualquat const & y, T const & a); + GLM_FUNC_DECL tdualquat lerp(tdualquat const& x, tdualquat const& y, T const& a); /// Returns the q inverse. /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL tdualquat inverse(tdualquat const & q); + GLM_FUNC_DECL tdualquat inverse(tdualquat const& q); /// Converts a quaternion to a 2 * 4 matrix. /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL mat<2, 4, T, P> mat2x4_cast(tdualquat const & x); + GLM_FUNC_DECL mat<2, 4, T, P> mat2x4_cast(tdualquat const& x); /// Converts a quaternion to a 3 * 4 matrix. /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL mat<3, 4, T, P> mat3x4_cast(tdualquat const & x); + GLM_FUNC_DECL mat<3, 4, T, P> mat3x4_cast(tdualquat const& x); /// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion. /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL tdualquat dualquat_cast(mat<2, 4, T, P> const & x); + GLM_FUNC_DECL tdualquat dualquat_cast(mat<2, 4, T, P> const& x); /// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion. /// /// @see gtx_dual_quaternion template - GLM_FUNC_DECL tdualquat dualquat_cast(mat<3, 4, T, P> const & x); + GLM_FUNC_DECL tdualquat dualquat_cast(mat<3, 4, T, P> const& x); /// Dual-quaternion of low single-qualifier floating-point numbers. diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index a2af4898..d86bd439 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -16,7 +16,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER typename tdualquat::part_type const & tdualquat::operator[](typename tdualquat::length_type i) const + GLM_FUNC_QUALIFIER typename tdualquat::part_type const& tdualquat::operator[](typename tdualquat::length_type i) const { assert(i >= 0 && i < this->length()); return (&real)[i]; @@ -32,7 +32,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const & d) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const& d) : real(d.real) , dual(d.dual) {} @@ -40,7 +40,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const & d) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const& d) : real(d.real) , dual(d.dual) {} @@ -48,12 +48,12 @@ namespace glm // -- Explicit basic constructors -- template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & r) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const& r) : real(r), dual(tquat(0, 0, 0, 0)) {} template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & q, vec<3, T, P> const& p) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const& q, vec<3, T, P> const& p) : real(q), dual( T(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z), T(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y), @@ -62,7 +62,7 @@ namespace glm {} template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const & r, tquat const & d) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tquat const& r, tquat const& d) : real(r), dual(d) {} @@ -70,19 +70,19 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const & q) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tdualquat::tdualquat(tdualquat const& q) : real(q.real) , dual(q.dual) {} template - GLM_FUNC_QUALIFIER tdualquat::tdualquat(mat<2, 4, T, P> const & m) + GLM_FUNC_QUALIFIER tdualquat::tdualquat(mat<2, 4, T, P> const& m) { *this = dualquat_cast(m); } template - GLM_FUNC_QUALIFIER tdualquat::tdualquat(mat<3, 4, T, P> const & m) + GLM_FUNC_QUALIFIER tdualquat::tdualquat(mat<3, 4, T, P> const& m) { *this = dualquat_cast(m); } @@ -91,7 +91,7 @@ namespace glm # if !GLM_HAS_DEFAULTED_FUNCTIONS template - GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator=(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator=(tdualquat const& q) { this->real = q.real; this->dual = q.dual; @@ -101,7 +101,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator=(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator=(tdualquat const& q) { this->real = q.real; this->dual = q.dual; @@ -129,13 +129,13 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_QUALIFIER tdualquat operator+(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat operator+(tdualquat const& q) { return q; } template - GLM_FUNC_QUALIFIER tdualquat operator-(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat operator-(tdualquat const& q) { return tdualquat(-q.real, -q.dual); } @@ -143,19 +143,19 @@ namespace glm // -- Binary operators -- template - GLM_FUNC_QUALIFIER tdualquat operator+(tdualquat const & q, tdualquat const & p) + GLM_FUNC_QUALIFIER tdualquat operator+(tdualquat const& q, tdualquat const& p) { return tdualquat(q.real + p.real,q.dual + p.dual); } template - GLM_FUNC_QUALIFIER tdualquat operator*(tdualquat const & p, tdualquat const & o) + GLM_FUNC_QUALIFIER tdualquat operator*(tdualquat const& p, tdualquat const& o) { return tdualquat(p.real * o.real,p.real * o.dual + p.dual * o.real); } template - GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tdualquat const & q, vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(tdualquat const& q, vec<3, T, P> const& v) { vec<3, T, P> const real_v3(q.real.x,q.real.y,q.real.z); vec<3, T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z); @@ -163,37 +163,37 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const & v, tdualquat const & q) + GLM_FUNC_QUALIFIER vec<3, T, P> operator*(vec<3, T, P> const& v, tdualquat const& q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tdualquat const & q, vec<4, T, P> const & v) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(tdualquat const& q, vec<4, T, P> const& v) { return vec<4, T, P>(q * vec<3, T, P>(v), v.w); } template - GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const & v, tdualquat const & q) + GLM_FUNC_QUALIFIER vec<4, T, P> operator*(vec<4, T, P> const& v, tdualquat const& q) { return glm::inverse(q) * v; } template - GLM_FUNC_QUALIFIER tdualquat operator*(tdualquat const & q, T const & s) + GLM_FUNC_QUALIFIER tdualquat operator*(tdualquat const& q, T const& s) { return tdualquat(q.real * s, q.dual * s); } template - GLM_FUNC_QUALIFIER tdualquat operator*(T const & s, tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat operator*(T const& s, tdualquat const& q) { return q * s; } template - GLM_FUNC_QUALIFIER tdualquat operator/(tdualquat const & q, T const & s) + GLM_FUNC_QUALIFIER tdualquat operator/(tdualquat const& q, T const& s) { return tdualquat(q.real / s, q.dual / s); } @@ -201,13 +201,13 @@ namespace glm // -- Boolean operators -- template - GLM_FUNC_QUALIFIER bool operator==(tdualquat const & q1, tdualquat const & q2) + GLM_FUNC_QUALIFIER bool operator==(tdualquat const& q1, tdualquat const& q2) { return (q1.real == q2.real) && (q1.dual == q2.dual); } template - GLM_FUNC_QUALIFIER bool operator!=(tdualquat const & q1, tdualquat const & q2) + GLM_FUNC_QUALIFIER bool operator!=(tdualquat const& q1, tdualquat const& q2) { return (q1.real != q2.real) || (q1.dual != q2.dual); } @@ -223,13 +223,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER tdualquat normalize(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat normalize(tdualquat const& q) { return q / length(q.real); } template - GLM_FUNC_QUALIFIER tdualquat lerp(tdualquat const & x, tdualquat const & y, T const & a) + GLM_FUNC_QUALIFIER tdualquat lerp(tdualquat const& x, tdualquat const& y, T const& a) { // Dual Quaternion Linear blend aka DLB: // Lerp is only defined in [0, 1] @@ -241,7 +241,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tdualquat inverse(tdualquat const & q) + GLM_FUNC_QUALIFIER tdualquat inverse(tdualquat const& q) { const glm::tquat real = conjugate(q.real); const glm::tquat dual = conjugate(q.dual); @@ -249,13 +249,13 @@ namespace glm } template - GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat2x4_cast(tdualquat const & x) + GLM_FUNC_QUALIFIER mat<2, 4, T, P> mat2x4_cast(tdualquat const& x) { return mat<2, 4, T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w ); } template - GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat3x4_cast(tdualquat const & x) + GLM_FUNC_QUALIFIER mat<3, 4, T, P> mat3x4_cast(tdualquat const& x) { tquat r = x.real / length2(x.real); @@ -291,7 +291,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tdualquat dualquat_cast(mat<2, 4, T, P> const & x) + GLM_FUNC_QUALIFIER tdualquat dualquat_cast(mat<2, 4, T, P> const& x) { return tdualquat( tquat( x[0].w, x[0].x, x[0].y, x[0].z ), @@ -299,7 +299,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tdualquat dualquat_cast(mat<3, 4, T, P> const & x) + GLM_FUNC_QUALIFIER tdualquat dualquat_cast(mat<3, 4, T, P> const& x) { tquat real; diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index 853d1ad4..9386c40b 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -32,110 +32,110 @@ namespace glm /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleX( - T const & angleX); + T const& angleX); /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleY( - T const & angleY); + T const& angleY); /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZ( - T const & angleZ); + T const& angleZ); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXY( - T const & angleX, - T const & angleY); + T const& angleX, + T const& angleY); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYX( - T const & angleY, - T const & angleX); + T const& angleY, + T const& angleX); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXZ( - T const & angleX, - T const & angleZ); + T const& angleX, + T const& angleZ); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZX( - T const & angle, - T const & angleX); + T const& angle, + T const& angleX); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYZ( - T const & angleY, - T const & angleZ); + T const& angleY, + T const& angleZ); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleZY( - T const & angleZ, - T const & angleY); + T const& angleZ, + T const& angleY); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleXYZ( - T const & t1, - T const & t2, - T const & t3); + T const& t1, + T const& t2, + T const& t3); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> eulerAngleYXZ( - T const & yaw, - T const & pitch, - T const & roll); + T const& yaw, + T const& pitch, + T const& roll); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template GLM_FUNC_DECL mat<4, 4, T, defaultp> yawPitchRoll( - T const & yaw, - T const & pitch, - T const & roll); + T const& yaw, + T const& pitch, + T const& roll); /// Creates a 2D 2 * 2 rotation matrix from an euler angle. /// @see gtx_euler_angles template - GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const & angle); + GLM_FUNC_DECL mat<2, 2, T, defaultp> orientate2(T const& angle); /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. /// @see gtx_euler_angles template - GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const & angle); + GLM_FUNC_DECL mat<3, 3, T, defaultp> orientate3(T const& angle); /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL mat<3, 3, T, P> orientate3(vec<3, T, P> const & angles); + GLM_FUNC_DECL mat<3, 3, T, P> orientate3(vec<3, T, P> const& angles); /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). /// @see gtx_euler_angles template - GLM_FUNC_DECL mat<4, 4, T, P> orientate4(vec<3, T, P> const & angles); + GLM_FUNC_DECL mat<4, 4, T, P> orientate4(vec<3, T, P> const& angles); /// Extracts the (X * Y * Z) Euler angles from the rotation matrix M /// @see gtx_euler_angles template - GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const & M, + GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M, T & t1, T & t2, T & t3); diff --git a/glm/gtx/euler_angles.inl b/glm/gtx/euler_angles.inl index fb60718a..dd62b071 100644 --- a/glm/gtx/euler_angles.inl +++ b/glm/gtx/euler_angles.inl @@ -8,7 +8,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleX ( - T const & angleX + T const& angleX ) { T cosX = glm::cos(angleX); @@ -24,7 +24,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleY ( - T const & angleY + T const& angleY ) { T cosY = glm::cos(angleY); @@ -40,7 +40,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZ ( - T const & angleZ + T const& angleZ ) { T cosZ = glm::cos(angleZ); @@ -56,8 +56,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXY ( - T const & angleX, - T const & angleY + T const& angleX, + T const& angleY ) { T cosX = glm::cos(angleX); @@ -75,8 +75,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYX ( - T const & angleY, - T const & angleX + T const& angleY, + T const& angleX ) { T cosX = glm::cos(angleX); @@ -94,8 +94,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXZ ( - T const & angleX, - T const & angleZ + T const& angleX, + T const& angleZ ) { return eulerAngleX(angleX) * eulerAngleZ(angleZ); @@ -104,8 +104,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZX ( - T const & angleZ, - T const & angleX + T const& angleZ, + T const& angleX ) { return eulerAngleZ(angleZ) * eulerAngleX(angleX); @@ -114,8 +114,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYZ ( - T const & angleY, - T const & angleZ + T const& angleY, + T const& angleZ ) { return eulerAngleY(angleY) * eulerAngleZ(angleZ); @@ -124,8 +124,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleZY ( - T const & angleZ, - T const & angleY + T const& angleZ, + T const& angleY ) { return eulerAngleZ(angleZ) * eulerAngleY(angleY); @@ -134,9 +134,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleXYZ ( - T const & t1, - T const & t2, - T const & t3 + T const& t1, + T const& t2, + T const& t3 ) { T c1 = glm::cos(-t1); @@ -169,9 +169,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> eulerAngleYXZ ( - T const & yaw, - T const & pitch, - T const & roll + T const& yaw, + T const& pitch, + T const& roll ) { T tmp_ch = glm::cos(yaw); @@ -204,9 +204,9 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> yawPitchRoll ( - T const & yaw, - T const & pitch, - T const & roll + T const& yaw, + T const& pitch, + T const& roll ) { T tmp_ch = glm::cos(yaw); @@ -239,7 +239,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 2, T, defaultp> orientate2 ( - T const & angle + T const& angle ) { T c = glm::cos(angle); @@ -256,7 +256,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, defaultp> orientate3 ( - T const & angle + T const& angle ) { T c = glm::cos(angle); @@ -278,7 +278,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> orientate3 ( - vec<3, T, P> const & angles + vec<3, T, P> const& angles ) { return mat<3, 3, T, P>(yawPitchRoll(angles.z, angles.x, angles.y)); @@ -287,14 +287,14 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> orientate4 ( - vec<3, T, P> const & angles + vec<3, T, P> const& angles ) { return yawPitchRoll(angles.z, angles.x, angles.y); } template - GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const & M, + GLM_FUNC_DECL void extractEulerAngleXYZ(mat<4, 4, T, defaultp> const& M, T & t1, T & t2, T & t3) diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index aa752704..078b7429 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -32,8 +32,8 @@ namespace glm /// @see gtx_extend template GLM_FUNC_DECL genType extend( - genType const & Origin, - genType const & Source, + genType const& Origin, + genType const& Source, typename genType::value_type const Length); /// @} diff --git a/glm/gtx/extend.inl b/glm/gtx/extend.inl index 929d1541..8cf93bb5 100644 --- a/glm/gtx/extend.inl +++ b/glm/gtx/extend.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER genType extend ( - genType const & Origin, - genType const & Source, - genType const & Distance + genType const& Origin, + genType const& Source, + genType const& Distance ) { return Origin + (Source - Origin) * Distance; @@ -17,9 +17,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<2, T, P> extend ( - vec<2, T, P> const & Origin, - vec<2, T, P> const & Source, - T const & Distance + vec<2, T, P> const& Origin, + vec<2, T, P> const& Source, + T const& Distance ) { return Origin + (Source - Origin) * Distance; @@ -28,9 +28,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> extend ( - vec<3, T, P> const & Origin, - vec<3, T, P> const & Source, - T const & Distance + vec<3, T, P> const& Origin, + vec<3, T, P> const& Source, + T const& Distance ) { return Origin + (Source - Origin) * Distance; @@ -39,9 +39,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, T, P> extend ( - vec<4, T, P> const & Origin, - vec<4, T, P> const & Source, - T const & Distance + vec<4, T, P> const& Origin, + vec<4, T, P> const& Source, + T const& Distance ) { return Origin + (Source - Origin) * Distance; diff --git a/glm/gtx/extended_min_max.hpp b/glm/gtx/extended_min_max.hpp index b2daa96b..9525ba72 100644 --- a/glm/gtx/extended_min_max.hpp +++ b/glm/gtx/extended_min_max.hpp @@ -32,103 +32,103 @@ namespace glm /// @see gtx_extented_min_max template GLM_FUNC_DECL T min( - T const & x, - T const & y, - T const & z); + T const& x, + T const& y, + T const& z); /// Return the minimum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - typename C::T const & y, - typename C::T const & z); + C const& x, + typename C::T const& y, + typename C::T const& z); /// Return the minimum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - C const & y, - C const & z); + C const& x, + C const& y, + C const& z); /// Return the minimum component-wise values of 4 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T min( - T const & x, - T const & y, - T const & z, - T const & w); + T const& x, + T const& y, + T const& z, + T const& w); /// Return the minimum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w); + C const& x, + typename C::T const& y, + typename C::T const& z, + typename C::T const& w); /// Return the minimum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C min( - C const & x, - C const & y, - C const & z, - C const & w); + C const& x, + C const& y, + C const& z, + C const& w); /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T max( - T const & x, - T const & y, - T const & z); + T const& x, + T const& y, + T const& z); /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - typename C::T const & y, - typename C::T const & z); + C const& x, + typename C::T const& y, + typename C::T const& z); /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - C const & y, - C const & z); + C const& x, + C const& y, + C const& z); /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template GLM_FUNC_DECL T max( - T const & x, - T const & y, - T const & z, - T const & w); + T const& x, + T const& y, + T const& z, + T const& w); /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w); + C const& x, + typename C::T const& y, + typename C::T const& z, + typename C::T const& w); /// Return the maximum component-wise values of 4 inputs /// @see gtx_extented_min_max template class C> GLM_FUNC_DECL C max( - C const & x, - C const & y, - C const & z, - C const & w); + C const& x, + C const& y, + C const& z, + C const& w); /// @} }//namespace glm diff --git a/glm/gtx/extended_min_max.inl b/glm/gtx/extended_min_max.inl index be09c93d..7e0fc45a 100644 --- a/glm/gtx/extended_min_max.inl +++ b/glm/gtx/extended_min_max.inl @@ -5,9 +5,9 @@ namespace glm { template GLM_FUNC_QUALIFIER T min( - T const & x, - T const & y, - T const & z) + T const& x, + T const& y, + T const& z) { return glm::min(glm::min(x, y), z); } @@ -15,9 +15,9 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C min ( - C const & x, - typename C::T const & y, - typename C::T const & z + C const& x, + typename C::T const& y, + typename C::T const& z ) { return glm::min(glm::min(x, y), z); @@ -26,9 +26,9 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C min ( - C const & x, - C const & y, - C const & z + C const& x, + C const& y, + C const& z ) { return glm::min(glm::min(x, y), z); @@ -37,10 +37,10 @@ namespace glm template GLM_FUNC_QUALIFIER T min ( - T const & x, - T const & y, - T const & z, - T const & w + T const& x, + T const& y, + T const& z, + T const& w ) { return glm::min(glm::min(x, y), glm::min(z, w)); @@ -49,10 +49,10 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C min ( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w + C const& x, + typename C::T const& y, + typename C::T const& z, + typename C::T const& w ) { return glm::min(glm::min(x, y), glm::min(z, w)); @@ -61,10 +61,10 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C min ( - C const & x, - C const & y, - C const & z, - C const & w + C const& x, + C const& y, + C const& z, + C const& w ) { return glm::min(glm::min(x, y), glm::min(z, w)); @@ -72,9 +72,9 @@ namespace glm template GLM_FUNC_QUALIFIER T max( - T const & x, - T const & y, - T const & z) + T const& x, + T const& y, + T const& z) { return glm::max(glm::max(x, y), z); } @@ -82,9 +82,9 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C max ( - C const & x, - typename C::T const & y, - typename C::T const & z + C const& x, + typename C::T const& y, + typename C::T const& z ) { return glm::max(glm::max(x, y), z); @@ -93,9 +93,9 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C max ( - C const & x, - C const & y, - C const & z + C const& x, + C const& y, + C const& z ) { return glm::max(glm::max(x, y), z); @@ -104,10 +104,10 @@ namespace glm template GLM_FUNC_QUALIFIER T max ( - T const & x, - T const & y, - T const & z, - T const & w + T const& x, + T const& y, + T const& z, + T const& w ) { return glm::max(glm::max(x, y), glm::max(z, w)); @@ -116,10 +116,10 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C max ( - C const & x, - typename C::T const & y, - typename C::T const & z, - typename C::T const & w + C const& x, + typename C::T const& y, + typename C::T const& z, + typename C::T const& w ) { return glm::max(glm::max(x, y), glm::max(z, w)); @@ -128,10 +128,10 @@ namespace glm template class C> GLM_FUNC_QUALIFIER C max ( - C const & x, - C const & y, - C const & z, - C const & w + C const& x, + C const& y, + C const& z, + C const& w ) { return glm::max(glm::max(x, y), glm::max(z, w)); diff --git a/glm/gtx/exterior_product.inl b/glm/gtx/exterior_product.inl index 5d269970..3d29d829 100644 --- a/glm/gtx/exterior_product.inl +++ b/glm/gtx/exterior_product.inl @@ -19,7 +19,7 @@ namespace detail }//namespace detail template - GLM_FUNC_QUALIFIER T cross(vec<2, T, P> const & x, vec<2, T, P> const & y) + GLM_FUNC_QUALIFIER T cross(vec<2, T, P> const& x, vec<2, T, P> const& y) { return detail::compute_cross_vec2::value>::call(x, y); } diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index c29edf1d..e1b98dc2 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -37,7 +37,7 @@ namespace glm /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastPow(vec const & x, vec const & y); + GLM_FUNC_DECL vec fastPow(vec const& x, vec const& y); /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential @@ -47,7 +47,7 @@ namespace glm /// Faster than the common pow function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastPow(vec const & x); + GLM_FUNC_DECL vec fastPow(vec const& x); /// Faster than the common exp function but less accurate. /// @see gtx_fast_exponential @@ -57,7 +57,7 @@ namespace glm /// Faster than the common exp function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastExp(vec const & x); + GLM_FUNC_DECL vec fastExp(vec const& x); /// Faster than the common log function but less accurate. /// @see gtx_fast_exponential @@ -67,7 +67,7 @@ namespace glm /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastLog(vec const & x); + GLM_FUNC_DECL vec fastLog(vec const& x); /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential @@ -77,7 +77,7 @@ namespace glm /// Faster than the common exp2 function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastExp2(vec const & x); + GLM_FUNC_DECL vec fastExp2(vec const& x); /// Faster than the common log2 function but less accurate. /// @see gtx_fast_exponential @@ -87,7 +87,7 @@ namespace glm /// Faster than the common log2 function but less accurate. /// @see gtx_fast_exponential template - GLM_FUNC_DECL vec fastLog2(vec const & x); + GLM_FUNC_DECL vec fastLog2(vec const& x); /// @} }//namespace glm diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index d8f2b700..a856cc3d 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -26,7 +26,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec fastPow(vec const & x, vec const & y) + GLM_FUNC_QUALIFIER vec fastPow(vec const& x, vec const& y) { vec Result; for(length_t i = 0, n = x.length(); i < n; ++i) diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index 8f014b3c..5b9e8177 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -42,7 +42,7 @@ namespace glm /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL vec fastSqrt(vec const & x); + GLM_FUNC_DECL vec fastSqrt(vec const& x); /// Faster than the common inversesqrt function but less accurate. /// @@ -54,7 +54,7 @@ namespace glm /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL vec fastInverseSqrt(vec const & x); + GLM_FUNC_DECL vec fastInverseSqrt(vec const& x); /// Faster than the common length function but less accurate. /// @@ -66,7 +66,7 @@ namespace glm /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL T fastLength(vec const & x); + GLM_FUNC_DECL T fastLength(vec const& x); /// Faster than the common distance function but less accurate. /// @@ -78,13 +78,13 @@ namespace glm /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL T fastDistance(vec const & x, vec const & y); + GLM_FUNC_DECL T fastDistance(vec const& x, vec const& y); /// Faster than the common normalize function but less accurate. /// /// @see gtx_fast_square_root extension. template - GLM_FUNC_DECL genType fastNormalize(genType const & x); + GLM_FUNC_DECL genType fastNormalize(genType const& x); /// @} }// namespace glm diff --git a/glm/gtx/fast_square_root.inl b/glm/gtx/fast_square_root.inl index 3083fd3b..551ad12d 100644 --- a/glm/gtx/fast_square_root.inl +++ b/glm/gtx/fast_square_root.inl @@ -13,7 +13,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec fastSqrt(vec const & x) + GLM_FUNC_QUALIFIER vec fastSqrt(vec const& x) { return detail::functor1::call(fastSqrt, x); } @@ -31,7 +31,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec fastInverseSqrt(vec const & x) + GLM_FUNC_QUALIFIER vec fastInverseSqrt(vec const& x) { return detail::compute_inversesqrt::value>::call(x); } @@ -46,7 +46,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER T fastLength(vec const & x) + GLM_FUNC_QUALIFIER T fastLength(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fastLength' only accept floating-point inputs"); diff --git a/glm/gtx/fast_trigonometry.inl b/glm/gtx/fast_trigonometry.inl index 02739faf..ad57b7c1 100644 --- a/glm/gtx/fast_trigonometry.inl +++ b/glm/gtx/fast_trigonometry.inl @@ -58,7 +58,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fastCos(vec const & x) + GLM_FUNC_QUALIFIER vec fastCos(vec const& x) { return detail::functor1::call(fastCos, x); } @@ -71,7 +71,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fastSin(vec const & x) + GLM_FUNC_QUALIFIER vec fastSin(vec const& x) { return detail::functor1::call(fastSin, x); } @@ -84,7 +84,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fastTan(vec const & x) + GLM_FUNC_QUALIFIER vec fastTan(vec const& x) { return detail::functor1::call(fastTan, x); } @@ -97,7 +97,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec fastAsin(vec const & x) + GLM_FUNC_QUALIFIER vec fastAsin(vec const& x) { return detail::functor1::call(fastAsin, x); } diff --git a/glm/gtx/float_notmalize.inl b/glm/gtx/float_notmalize.inl index 69f2c483..fa3ce8c2 100644 --- a/glm/gtx/float_notmalize.inl +++ b/glm/gtx/float_notmalize.inl @@ -6,7 +6,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER vec floatNormalize(vec const & v) + GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) { return vec(v) / static_cast(std::numeric_limits::max()); } diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index eb34d640..1725179b 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -33,18 +33,18 @@ namespace glm /// @see - gtx_gradient_paint template GLM_FUNC_DECL T radialGradient( - vec<2, T, P> const & Center, - T const & Radius, - vec<2, T, P> const & Focal, - vec<2, T, P> const & Position); + vec<2, T, P> const& Center, + T const& Radius, + vec<2, T, P> const& Focal, + vec<2, T, P> const& Position); /// Return a color from a linear gradient. /// @see - gtx_gradient_paint template GLM_FUNC_DECL T linearGradient( - vec<2, T, P> const & Point0, - vec<2, T, P> const & Point1, - vec<2, T, P> const & Position); + vec<2, T, P> const& Point0, + vec<2, T, P> const& Point1, + vec<2, T, P> const& Position); /// @} }// namespace glm diff --git a/glm/gtx/gradient_paint.inl b/glm/gtx/gradient_paint.inl index 5a10fb7a..bfbd81f2 100644 --- a/glm/gtx/gradient_paint.inl +++ b/glm/gtx/gradient_paint.inl @@ -6,10 +6,10 @@ namespace glm template GLM_FUNC_QUALIFIER T radialGradient ( - vec<2, T, P> const & Center, - T const & Radius, - vec<2, T, P> const & Focal, - vec<2, T, P> const & Position + vec<2, T, P> const& Center, + T const& Radius, + vec<2, T, P> const& Focal, + vec<2, T, P> const& Position ) { vec<2, T, P> F = Focal - Center; @@ -26,9 +26,9 @@ namespace glm template GLM_FUNC_QUALIFIER T linearGradient ( - vec<2, T, P> const & Point0, - vec<2, T, P> const & Point1, - vec<2, T, P> const & Position + vec<2, T, P> const& Point0, + vec<2, T, P> const& Point1, + vec<2, T, P> const& Position ) { vec<2, T, P> Dist = Point1 - Point0; diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index d82738f6..95c3fcd9 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -32,17 +32,17 @@ namespace glm //! From GLM_GTX_handed_coordinate_space extension. template GLM_FUNC_DECL bool rightHanded( - vec<3, T, P> const & tangent, - vec<3, T, P> const & binormal, - vec<3, T, P> const & normal); + vec<3, T, P> const& tangent, + vec<3, T, P> const& binormal, + vec<3, T, P> const& normal); //! Return if a trihedron left handed or not. //! From GLM_GTX_handed_coordinate_space extension. template GLM_FUNC_DECL bool leftHanded( - vec<3, T, P> const & tangent, - vec<3, T, P> const & binormal, - vec<3, T, P> const & normal); + vec<3, T, P> const& tangent, + vec<3, T, P> const& binormal, + vec<3, T, P> const& normal); /// @} }// namespace glm diff --git a/glm/gtx/handed_coordinate_space.inl b/glm/gtx/handed_coordinate_space.inl index 2d37e94d..bd1432fc 100644 --- a/glm/gtx/handed_coordinate_space.inl +++ b/glm/gtx/handed_coordinate_space.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool rightHanded ( - vec<3, T, P> const & tangent, - vec<3, T, P> const & binormal, - vec<3, T, P> const & normal + vec<3, T, P> const& tangent, + vec<3, T, P> const& binormal, + vec<3, T, P> const& normal ) { return dot(cross(normal, tangent), binormal) > T(0); @@ -17,9 +17,9 @@ namespace glm template GLM_FUNC_QUALIFIER bool leftHanded ( - vec<3, T, P> const & tangent, - vec<3, T, P> const & binormal, - vec<3, T, P> const & normal + vec<3, T, P> const& tangent, + vec<3, T, P> const& binormal, + vec<3, T, P> const& normal ) { return dot(cross(normal, tangent), binormal) < T(0); diff --git a/glm/gtx/hash.hpp b/glm/gtx/hash.hpp index 83956dd5..9b090bc0 100644 --- a/glm/gtx/hash.hpp +++ b/glm/gtx/hash.hpp @@ -47,91 +47,91 @@ namespace std template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::vec<1, T, P> const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<1, T, P> const& v) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::vec<2, T, P> const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<2, T, P> const& v) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::vec<3, T, P> const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<3, T, P> const& v) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::vec<4, T, P> const & v) const; + GLM_FUNC_DECL size_t operator()(glm::vec<4, T, P> const& v) const; }; template struct hash> { - GLM_FUNC_DECL size_t operator()(glm::tquat const & q) const; + GLM_FUNC_DECL size_t operator()(glm::tquat const& q) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::tdualquat const & q) const; + GLM_FUNC_DECL size_t operator()(glm::tdualquat const& q) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<2, 2, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<2, 3, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<2, 4, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<3, 2, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<3, 3, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<3, 4, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<4, 2, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<4, 3, T,P> const& m) const; }; template struct hash > { - GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,P> const & m) const; + GLM_FUNC_DECL size_t operator()(glm::mat<4, 4, T,P> const& m) const; }; } // namespace std diff --git a/glm/gtx/hash.inl b/glm/gtx/hash.inl index 97ec740e..3914eb53 100644 --- a/glm/gtx/hash.inl +++ b/glm/gtx/hash.inl @@ -23,14 +23,14 @@ namespace detail namespace std { template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<1, T, P> const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<1, T, P> const& v) const { hash hasher; return hasher(v.x); } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<2, T, P> const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<2, T, P> const& v) const { size_t seed = 0; hash hasher; @@ -40,7 +40,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<3, T, P> const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<3, T, P> const& v) const { size_t seed = 0; hash hasher; @@ -51,7 +51,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<4, T, P> const & v) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::vec<4, T, P> const& v) const { size_t seed = 0; hash hasher; @@ -63,7 +63,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tquat const & q) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tquat const& q) const { size_t seed = 0; hash hasher; @@ -75,7 +75,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tdualquat const & q) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::tdualquat const& q) const { size_t seed = 0; hash> hasher; @@ -148,7 +148,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::mat<4, 2, T,P> const & m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::mat<4, 2, T,P> const& m) const { size_t seed = 0; hash> hasher; @@ -160,7 +160,7 @@ namespace std } template - GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::mat<4, 3, T,P> const & m) const + GLM_FUNC_QUALIFIER size_t hash>::operator()(glm::mat<4, 3, T,P> const& m) const { size_t seed = 0; hash> hasher; diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp index 9420581c..47a2ad3c 100644 --- a/glm/gtx/integer.hpp +++ b/glm/gtx/integer.hpp @@ -48,7 +48,7 @@ namespace glm //! Return the factorial value of a number (!12 max, integer only) //! From GLM_GTX_integer extension. template - GLM_FUNC_DECL genType factorial(genType const & x); + GLM_FUNC_DECL genType factorial(genType const& x); //! 32bit signed integer. //! From GLM_GTX_integer extension. diff --git a/glm/gtx/integer.inl b/glm/gtx/integer.inl index 633f46e7..6a4133af 100644 --- a/glm/gtx/integer.inl +++ b/glm/gtx/integer.inl @@ -71,7 +71,7 @@ namespace detail // factorial (!12 max, integer only) template - GLM_FUNC_QUALIFIER genType factorial(genType const & x) + GLM_FUNC_QUALIFIER genType factorial(genType const& x) { genType Temp = x; genType Result; @@ -82,7 +82,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<2, T, P> factorial( - vec<2, T, P> const & x) + vec<2, T, P> const& x) { return vec<2, T, P>( factorial(x.x), @@ -91,7 +91,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<3, T, P> factorial( - vec<3, T, P> const & x) + vec<3, T, P> const& x) { return vec<3, T, P>( factorial(x.x), @@ -101,7 +101,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec<4, T, P> factorial( - vec<4, T, P> const & x) + vec<4, T, P> const& x) { return vec<4, T, P>( factorial(x.x), diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index 9da5d3d3..e6c3b072 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -39,8 +39,8 @@ namespace glm //! From GLM_GTX_intersect extension. template GLM_FUNC_DECL bool intersectRayPlane( - genType const & orig, genType const & dir, - genType const & planeOrig, genType const & planeNormal, + genType const& orig, genType const& dir, + genType const& planeOrig, genType const& planeNormal, typename genType::value_type & intersectionDistance); //! Compute the intersection of a ray and a triangle. @@ -56,8 +56,8 @@ namespace glm //! From GLM_GTX_intersect extension. template GLM_FUNC_DECL bool intersectLineTriangle( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, + genType const& orig, genType const& dir, + genType const& vert0, genType const& vert1, genType const& vert2, genType & position); //! Compute the intersection distance of a ray and a sphere. @@ -65,24 +65,24 @@ namespace glm //! From GLM_GTX_intersect extension. template GLM_FUNC_DECL bool intersectRaySphere( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, typename genType::value_type const sphereRadiusSquered, + genType const& rayStarting, genType const& rayNormalizedDirection, + genType const& sphereCenter, typename genType::value_type const sphereRadiusSquered, typename genType::value_type & intersectionDistance); //! Compute the intersection of a ray and a sphere. //! From GLM_GTX_intersect extension. template GLM_FUNC_DECL bool intersectRaySphere( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType const& rayStarting, genType const& rayNormalizedDirection, + genType const& sphereCenter, const typename genType::value_type sphereRadius, genType & intersectionPosition, genType & intersectionNormal); //! Compute the intersection of a line and a sphere. //! From GLM_GTX_intersect extension template GLM_FUNC_DECL bool intersectLineSphere( - genType const & point0, genType const & point1, - genType const & sphereCenter, typename genType::value_type sphereRadius, + genType const& point0, genType const& point1, + genType const& sphereCenter, typename genType::value_type sphereRadius, genType & intersectionPosition1, genType & intersectionNormal1, genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); diff --git a/glm/gtx/intersect.inl b/glm/gtx/intersect.inl index e50da76f..b59ad77f 100644 --- a/glm/gtx/intersect.inl +++ b/glm/gtx/intersect.inl @@ -6,8 +6,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectRayPlane ( - genType const & orig, genType const & dir, - genType const & planeOrig, genType const & planeNormal, + genType const& orig, genType const& dir, + genType const& planeOrig, genType const& planeNormal, typename genType::value_type & intersectionDistance ) { @@ -121,8 +121,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectLineTriangle ( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, + genType const& orig, genType const& dir, + genType const& vert0, genType const& vert1, genType const& vert2, genType & position ) { @@ -159,8 +159,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectRaySphere ( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, + genType const& rayStarting, genType const& rayNormalizedDirection, + genType const& sphereCenter, const typename genType::value_type sphereRadiusSquered, typename genType::value_type & intersectionDistance ) { @@ -180,8 +180,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectRaySphere ( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType const& rayStarting, genType const& rayNormalizedDirection, + genType const& sphereCenter, const typename genType::value_type sphereRadius, genType & intersectionPosition, genType & intersectionNormal ) { @@ -198,8 +198,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool intersectLineSphere ( - genType const & point0, genType const & point1, - genType const & sphereCenter, typename genType::value_type sphereRadius, + genType const& point0, genType const& point1, + genType const& sphereCenter, typename genType::value_type sphereRadius, genType & intersectionPoint1, genType & intersectionNormal1, genType & intersectionPoint2, genType & intersectionNormal2 ) diff --git a/glm/gtx/io.hpp b/glm/gtx/io.hpp index 1a344399..4d459a19 100644 --- a/glm/gtx/io.hpp +++ b/glm/gtx/io.hpp @@ -193,7 +193,7 @@ namespace glm template GLM_FUNC_DECL std::basic_ostream & operator<<(std::basic_ostream &, - std::pair const, mat<4, 4, T,P> const> const &); + std::pair const, mat<4, 4, T,P> const> const&); /// @} }//namespace glm diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index c1df2d88..5acadb61 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -160,7 +160,7 @@ namespace detail if(cerberus) { - io::format_punct const & fmt(io::get_facet >(os)); + io::format_punct const& fmt(io::get_facet >(os)); length_t const& components(type::components); @@ -234,7 +234,7 @@ namespace detail if(cerberus) { - io::format_punct const & fmt(io::get_facet >(os)); + io::format_punct const& fmt(io::get_facet >(os)); length_t const& cols(type >::cols); length_t const& rows(type >::rows); diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index 9e7550ae..f0de1577 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -32,8 +32,8 @@ namespace glm /// From GLM_GTX_log_base. template GLM_FUNC_DECL genType log( - genType const & x, - genType const & base); + genType const& x, + genType const& base); /// Logarithm for any base. /// From GLM_GTX_log_base. diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 10704893..20a2ee96 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -33,13 +33,13 @@ namespace glm //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL mat<3, 3, T, P> matrixCross3( - vec<3, T, P> const & x); + vec<3, T, P> const& x); //! Build a cross product matrix. //! From GLM_GTX_matrix_cross_product extension. template GLM_FUNC_DECL mat<4, 4, T, P> matrixCross4( - vec<3, T, P> const & x); + vec<3, T, P> const& x); /// @} }//namespace glm diff --git a/glm/gtx/matrix_cross_product.inl b/glm/gtx/matrix_cross_product.inl index 2e349cc3..4d499db5 100644 --- a/glm/gtx/matrix_cross_product.inl +++ b/glm/gtx/matrix_cross_product.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> matrixCross3 ( - vec<3, T, P> const & x + vec<3, T, P> const& x ) { mat<3, 3, T, P> Result(T(0)); @@ -22,7 +22,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> matrixCross4 ( - vec<3, T, P> const & x + vec<3, T, P> const& x ) { mat<4, 4, T, P> Result(T(0)); diff --git a/glm/gtx/matrix_decompose.inl b/glm/gtx/matrix_decompose.inl index 03d9a14a..0467360d 100644 --- a/glm/gtx/matrix_decompose.inl +++ b/glm/gtx/matrix_decompose.inl @@ -11,8 +11,8 @@ namespace detail // result = (a * ascl) + (b * bscl) template GLM_FUNC_QUALIFIER vec<3, T, P> combine( - vec<3, T, P> const & a, - vec<3, T, P> const & b, + vec<3, T, P> const& a, + vec<3, T, P> const& b, T ascl, T bscl) { return (a * ascl) + (b * bscl); @@ -30,7 +30,7 @@ namespace detail // Decomposes the mode matrix to translations,rotation scale components template - GLM_FUNC_QUALIFIER bool decompose(mat<4, 4, T, P> const & ModelMatrix, vec<3, T, P> & Scale, tquat & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective) + GLM_FUNC_QUALIFIER bool decompose(mat<4, 4, T, P> const& ModelMatrix, vec<3, T, P> & Scale, tquat & Orientation, vec<3, T, P> & Translation, vec<3, T, P> & Skew, vec<4, T, P> & Perspective) { mat<4, 4, T, P> LocalMatrix(ModelMatrix); diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index da36fd23..93c4ff7f 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -41,7 +41,7 @@ namespace glm /// From GLM_GTX_matrix_interpolation extension. template GLM_FUNC_DECL mat<4, 4, T, P> axisAngleMatrix( - vec<3, T, P> const & axis, + vec<3, T, P> const& axis, T const angle); /// Extracts the rotation part of a matrix. diff --git a/glm/gtx/matrix_interpolation.inl b/glm/gtx/matrix_interpolation.inl index 0cc7d462..76dd1b17 100644 --- a/glm/gtx/matrix_interpolation.inl +++ b/glm/gtx/matrix_interpolation.inl @@ -89,7 +89,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER mat<4, 4, T, P> axisAngleMatrix(vec<3, T, P> const & axis, T const angle) + GLM_FUNC_QUALIFIER mat<4, 4, T, P> axisAngleMatrix(vec<3, T, P> const& axis, T const angle) { T c = cos(angle); T s = sin(angle); diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 1fcf78fd..9e54398e 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -33,8 +33,8 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<2, 2, T, P> rowMajor2( - vec<2, T, P> const & v1, - vec<2, T, P> const & v2); + vec<2, T, P> const& v1, + vec<2, T, P> const& v2); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -46,9 +46,9 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<3, 3, T, P> rowMajor3( - vec<3, T, P> const & v1, - vec<3, T, P> const & v2, - vec<3, T, P> const & v3); + vec<3, T, P> const& v1, + vec<3, T, P> const& v2, + vec<3, T, P> const& v3); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -60,10 +60,10 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<4, 4, T, P> rowMajor4( - vec<4, T, P> const & v1, - vec<4, T, P> const & v2, - vec<4, T, P> const & v3, - vec<4, T, P> const & v4); + vec<4, T, P> const& v1, + vec<4, T, P> const& v2, + vec<4, T, P> const& v3, + vec<4, T, P> const& v4); //! Build a row major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -75,8 +75,8 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<2, 2, T, P> colMajor2( - vec<2, T, P> const & v1, - vec<2, T, P> const & v2); + vec<2, T, P> const& v1, + vec<2, T, P> const& v2); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -88,9 +88,9 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<3, 3, T, P> colMajor3( - vec<3, T, P> const & v1, - vec<3, T, P> const & v2, - vec<3, T, P> const & v3); + vec<3, T, P> const& v1, + vec<3, T, P> const& v2, + vec<3, T, P> const& v3); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. @@ -102,10 +102,10 @@ namespace glm //! From GLM_GTX_matrix_major_storage extension. template GLM_FUNC_DECL mat<4, 4, T, P> colMajor4( - vec<4, T, P> const & v1, - vec<4, T, P> const & v2, - vec<4, T, P> const & v3, - vec<4, T, P> const & v4); + vec<4, T, P> const& v1, + vec<4, T, P> const& v2, + vec<4, T, P> const& v3, + vec<4, T, P> const& v4); //! Build a column major matrix from other matrix. //! From GLM_GTX_matrix_major_storage extension. diff --git a/glm/gtx/matrix_major_storage.inl b/glm/gtx/matrix_major_storage.inl index 238c4dbe..cae310a4 100644 --- a/glm/gtx/matrix_major_storage.inl +++ b/glm/gtx/matrix_major_storage.inl @@ -6,8 +6,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 2, T, P> rowMajor2 ( - vec<2, T, P> const & v1, - vec<2, T, P> const & v2 + vec<2, T, P> const& v1, + vec<2, T, P> const& v2 ) { mat<2, 2, T, P> Result; diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index ad8a99a6..ca2667bc 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -32,55 +32,55 @@ namespace glm //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<2, 2, T, P> diagonal2x2( - vec<2, T, P> const & v); + vec<2, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<2, 3, T, P> diagonal2x3( - vec<2, T, P> const & v); + vec<2, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<2, 4, T, P> diagonal2x4( - vec<2, T, P> const & v); + vec<2, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<3, 2, T, P> diagonal3x2( - vec<2, T, P> const & v); + vec<2, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<3, 3, T, P> diagonal3x3( - vec<3, T, P> const & v); + vec<3, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<3, 4, T, P> diagonal3x4( - vec<3, T, P> const & v); + vec<3, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<4, 2, T, P> diagonal4x2( - vec<2, T, P> const & v); + vec<2, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<4, 3, T, P> diagonal4x3( - vec<3, T, P> const & v); + vec<3, T, P> const& v); //! Build a diagonal matrix. //! From GLM_GTX_matrix_operation extension. template GLM_FUNC_DECL mat<4, 4, T, P> diagonal4x4( - vec<4, T, P> const & v); + vec<4, T, P> const& v); /// @} }//namespace glm diff --git a/glm/gtx/matrix_operation.inl b/glm/gtx/matrix_operation.inl index ad17898e..646d800e 100644 --- a/glm/gtx/matrix_operation.inl +++ b/glm/gtx/matrix_operation.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 2, T, P> diagonal2x2 ( - vec<2, T, P> const & v + vec<2, T, P> const& v ) { mat<2, 2, T, P> Result(static_cast(1)); @@ -18,7 +18,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 3, T, P> diagonal2x3 ( - vec<2, T, P> const & v + vec<2, T, P> const& v ) { mat<2, 3, T, P> Result(static_cast(1)); @@ -30,7 +30,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<2, 4, T, P> diagonal2x4 ( - vec<2, T, P> const & v + vec<2, T, P> const& v ) { mat<2, 4, T, P> Result(static_cast(1)); @@ -42,7 +42,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 2, T, P> diagonal3x2 ( - vec<2, T, P> const & v + vec<2, T, P> const& v ) { mat<3, 2, T, P> Result(static_cast(1)); @@ -54,7 +54,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> diagonal3x3 ( - vec<3, T, P> const & v + vec<3, T, P> const& v ) { mat<3, 3, T, P> Result(static_cast(1)); @@ -67,7 +67,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 4, T, P> diagonal3x4 ( - vec<3, T, P> const & v + vec<3, T, P> const& v ) { mat<3, 4, T, P> Result(static_cast(1)); @@ -80,7 +80,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> diagonal4x4 ( - vec<4, T, P> const & v + vec<4, T, P> const& v ) { mat<4, 4, T, P> Result(static_cast(1)); @@ -94,7 +94,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 3, T, P> diagonal4x3 ( - vec<3, T, P> const & v + vec<3, T, P> const& v ) { mat<4, 3, T, P> Result(static_cast(1)); @@ -107,7 +107,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 2, T, P> diagonal4x2 ( - vec<2, T, P> const & v + vec<2, T, P> const& v ) { mat<4, 2, T, P> Result(static_cast(1)); diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index d81f112f..9a3a9b94 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -34,42 +34,42 @@ namespace glm /// Return whether a matrix a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(mat<2, 2, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNull(mat<2, 2, T, P> const& m, T const& epsilon); /// Return whether a matrix a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(mat<3, 3, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNull(mat<3, 3, T, P> const& m, T const& epsilon); /// Return whether a matrix is a null matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNull(mat<4, 4, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNull(mat<4, 4, T, P> const& m, T const& epsilon); /// Return whether a matrix is an identity matrix. /// From GLM_GTX_matrix_query extension. template class matType> - GLM_FUNC_DECL bool isIdentity(matType const & m, T const & epsilon); + GLM_FUNC_DECL bool isIdentity(matType const& m, T const& epsilon); /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(mat<2, 2, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(mat<2, 2, T, P> const& m, T const& epsilon); /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(mat<3, 3, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(mat<3, 3, T, P> const& m, T const& epsilon); /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. template - GLM_FUNC_DECL bool isNormalized(mat<4, 4, T, P> const & m, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(mat<4, 4, T, P> const& m, T const& epsilon); /// Return whether a matrix is an orthonormalized matrix. /// From GLM_GTX_matrix_query extension. template class matType> - GLM_FUNC_DECL bool isOrthogonal(matType const & m, T const & epsilon); + GLM_FUNC_DECL bool isOrthogonal(matType const& m, T const& epsilon); /// @} }//namespace glm diff --git a/glm/gtx/matrix_transform_2d.hpp b/glm/gtx/matrix_transform_2d.hpp index 443db9f6..ebab5ca2 100644 --- a/glm/gtx/matrix_transform_2d.hpp +++ b/glm/gtx/matrix_transform_2d.hpp @@ -37,7 +37,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> translate( mat<3, 3, T, P> const& m, - vec<2, T, P> const & v); + vec<2, T, P> const& v); /// Builds a rotation 3 * 3 matrix created from an angle. /// @@ -55,7 +55,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> scale( mat<3, 3, T, P> const& m, - vec<2, T, P> const & v); + vec<2, T, P> const& v); /// Builds an horizontal (parallel to the x axis) shear 3 * 3 matrix. /// diff --git a/glm/gtx/matrix_transform_2d.inl b/glm/gtx/matrix_transform_2d.inl index 95262aa9..5bcb53a9 100644 --- a/glm/gtx/matrix_transform_2d.inl +++ b/glm/gtx/matrix_transform_2d.inl @@ -10,7 +10,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> translate( mat<3, 3, T, P> const& m, - vec<2, T, P> const & v) + vec<2, T, P> const& v) { mat<3, 3, T, P> Result(m); Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; @@ -37,7 +37,7 @@ namespace glm template GLM_FUNC_QUALIFIER mat<3, 3, T, P> scale( mat<3, 3, T, P> const& m, - vec<2, T, P> const & v) + vec<2, T, P> const& v) { mat<3, 3, T, P> Result; Result[0] = m[0] * v[0]; diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index efb57d38..19012162 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -31,9 +31,9 @@ namespace glm /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) template GLM_FUNC_DECL T mixedProduct( - vec<3, T, P> const & v1, - vec<3, T, P> const & v2, - vec<3, T, P> const & v3); + vec<3, T, P> const& v1, + vec<3, T, P> const& v2, + vec<3, T, P> const& v3); /// @} }// namespace glm diff --git a/glm/gtx/mixed_product.inl b/glm/gtx/mixed_product.inl index 8f0e22f3..d6f2a012 100644 --- a/glm/gtx/mixed_product.inl +++ b/glm/gtx/mixed_product.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER T mixedProduct ( - vec<3, T, P> const & v1, - vec<3, T, P> const & v2, - vec<3, T, P> const & v3 + vec<3, T, P> const& v1, + vec<3, T, P> const& v2, + vec<3, T, P> const& v3 ) { return dot(cross(v1, v2), v3); diff --git a/glm/gtx/norm.inl b/glm/gtx/norm.inl index c8699583..a49a0c76 100644 --- a/glm/gtx/norm.inl +++ b/glm/gtx/norm.inl @@ -9,7 +9,7 @@ namespace detail template struct compute_length2 { - GLM_FUNC_QUALIFIER static T call(vec const & v) + GLM_FUNC_QUALIFIER static T call(vec const& v) { return dot(v, v); } @@ -24,7 +24,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER T length2(vec const & v) + GLM_FUNC_QUALIFIER T length2(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length2' accepts only floating-point inputs"); return detail::compute_length2::value>::call(v); @@ -38,20 +38,20 @@ namespace detail } template - GLM_FUNC_QUALIFIER T distance2(vec const & p0, vec const & p1) + GLM_FUNC_QUALIFIER T distance2(vec const& p0, vec const& p1) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance2' accepts only floating-point inputs"); return length2(p1 - p0); } template - GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, P> const & a, vec<3, T, P> const & b) + GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, P> const& a, vec<3, T, P> const& b) { return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); } template - GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER T l1Norm(vec<3, T, P> const& v) { return abs(v.x) + abs(v.y) + abs(v.z); } @@ -64,13 +64,13 @@ namespace detail } template - GLM_FUNC_QUALIFIER T l2Norm(vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER T l2Norm(vec<3, T, P> const& v) { return length(v); } template - GLM_FUNC_QUALIFIER T lxNorm(vec<3, T, P> const & x, vec<3, T, P> const & y, unsigned int Depth) + GLM_FUNC_QUALIFIER T lxNorm(vec<3, T, P> const& x, vec<3, T, P> const& y, unsigned int Depth) { return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); } diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index e5002c8f..a3069866 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -33,7 +33,7 @@ namespace glm /// /// @see gtx_normal template - GLM_FUNC_DECL vec<3, T, P> triangleNormal(vec<3, T, P> const & p1, vec<3, T, P> const & p2, vec<3, T, P> const & p3); + GLM_FUNC_DECL vec<3, T, P> triangleNormal(vec<3, T, P> const& p1, vec<3, T, P> const& p2, vec<3, T, P> const& p3); /// @} }//namespace glm diff --git a/glm/gtx/normal.inl b/glm/gtx/normal.inl index 94844759..e88a9a06 100644 --- a/glm/gtx/normal.inl +++ b/glm/gtx/normal.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> triangleNormal ( - vec<3, T, P> const & p1, - vec<3, T, P> const & p2, - vec<3, T, P> const & p3 + vec<3, T, P> const& p1, + vec<3, T, P> const& p2, + vec<3, T, P> const& p3 ) { return normalize(cross(p1 - p2, p1 - p3)); diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp index 86802c21..2c1d8983 100644 --- a/glm/gtx/normalize_dot.hpp +++ b/glm/gtx/normalize_dot.hpp @@ -34,14 +34,14 @@ namespace glm /// /// @see gtx_normalize_dot extension. template - GLM_FUNC_DECL T normalizeDot(vec const & x, vec const & y); + GLM_FUNC_DECL T normalizeDot(vec const& x, vec const& y); /// Normalize parameters and returns the dot product of x and y. /// Faster that dot(fastNormalize(x), fastNormalize(y)). /// /// @see gtx_normalize_dot extension. template - GLM_FUNC_DECL T fastNormalizeDot(vec const & x, vec const & y); + GLM_FUNC_DECL T fastNormalizeDot(vec const& x, vec const& y); /// @} }//namespace glm diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index 849e8195..38e0327d 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -33,19 +33,19 @@ namespace gtx /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow2(genType const & x); + GLM_FUNC_DECL genType pow2(genType const& x); /// Returns x raised to the power of 3. /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow3(genType const & x); + GLM_FUNC_DECL genType pow3(genType const& x); /// Returns x raised to the power of 4. /// /// @see gtx_optimum_pow template - GLM_FUNC_DECL genType pow4(genType const & x); + GLM_FUNC_DECL genType pow4(genType const& x); /// @} }//namespace gtx diff --git a/glm/gtx/optimum_pow.inl b/glm/gtx/optimum_pow.inl index 2e933a23..78b729f7 100644 --- a/glm/gtx/optimum_pow.inl +++ b/glm/gtx/optimum_pow.inl @@ -4,19 +4,19 @@ namespace glm { template - GLM_FUNC_QUALIFIER genType pow2(genType const & x) + GLM_FUNC_QUALIFIER genType pow2(genType const& x) { return x * x; } template - GLM_FUNC_QUALIFIER genType pow3(genType const & x) + GLM_FUNC_QUALIFIER genType pow3(genType const& x) { return x * x * x; } template - GLM_FUNC_QUALIFIER genType pow4(genType const & x) + GLM_FUNC_QUALIFIER genType pow4(genType const& x) { return (x * x) * (x * x); } diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 1e1c10d1..cc25074c 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -35,13 +35,13 @@ namespace glm /// /// @see gtx_orthonormalize template - GLM_FUNC_DECL mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m); + GLM_FUNC_DECL mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const& m); /// Orthonormalizes x according y. /// /// @see gtx_orthonormalize template - GLM_FUNC_DECL vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y); + GLM_FUNC_DECL vec<3, T, P> orthonormalize(vec<3, T, P> const& x, vec<3, T, P> const& y); /// @} }//namespace glm diff --git a/glm/gtx/orthonormalize.inl b/glm/gtx/orthonormalize.inl index 5d7b07a8..b6edee81 100644 --- a/glm/gtx/orthonormalize.inl +++ b/glm/gtx/orthonormalize.inl @@ -4,7 +4,7 @@ namespace glm { template - GLM_FUNC_QUALIFIER mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const & m) + GLM_FUNC_QUALIFIER mat<3, 3, T, P> orthonormalize(mat<3, 3, T, P> const& m) { mat<3, 3, T, P> r = m; @@ -23,7 +23,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER vec<3, T, P> orthonormalize(vec<3, T, P> const & x, vec<3, T, P> const & y) + GLM_FUNC_QUALIFIER vec<3, T, P> orthonormalize(vec<3, T, P> const& x, vec<3, T, P> const& y) { return normalize(x - y * dot(y, x)); } diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index 2c005856..95e872b1 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -33,14 +33,14 @@ namespace glm /// @see gtx_polar_coordinates template GLM_FUNC_DECL vec<3, T, P> polar( - vec<3, T, P> const & euclidean); + vec<3, T, P> const& euclidean); /// Convert Polar to Euclidean coordinates. /// /// @see gtx_polar_coordinates template GLM_FUNC_DECL vec<3, T, P> euclidean( - vec<2, T, P> const & polar); + vec<2, T, P> const& polar); /// @} }//namespace glm diff --git a/glm/gtx/polar_coordinates.inl b/glm/gtx/polar_coordinates.inl index bb0d5b34..68761a7d 100644 --- a/glm/gtx/polar_coordinates.inl +++ b/glm/gtx/polar_coordinates.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> polar ( - vec<3, T, P> const & euclidean + vec<3, T, P> const& euclidean ) { T const Length(length(euclidean)); @@ -22,7 +22,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> euclidean ( - vec<2, T, P> const & polar + vec<2, T, P> const& polar ) { T const latitude(polar.x); diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index c9fb694f..e2506640 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -43,16 +43,16 @@ namespace glm /// @see gtx_quaternion template GLM_FUNC_DECL vec<3, T, P> cross( - tquat const & q, - vec<3, T, P> const & v); + tquat const& q, + vec<3, T, P> const& v); //! Compute a cross product between a vector and a quaternion. /// /// @see gtx_quaternion template GLM_FUNC_DECL vec<3, T, P> cross( - vec<3, T, P> const & v, - tquat const & q); + vec<3, T, P> const& v, + tquat const& q); //! Compute a point on a path according squad equation. //! q1 and q2 are control points; s1 and s2 are intermediate control points. @@ -102,7 +102,7 @@ namespace glm /// @see gtx_quaternion //template //tquat sqrt( - // tquat const & q); + // tquat const& q); //! Rotates a 3 components vector by a quaternion. /// @@ -214,7 +214,7 @@ namespace glm /// /// @see gtx_quaternion template - GLM_FUNC_DECL T length2(tquat const & q); + GLM_FUNC_DECL T length2(tquat const& q); /// @} }//namespace glm diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index 4e0c0204..bcb0eab9 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -27,11 +27,11 @@ namespace glm template GLM_FUNC_QUALIFIER tquat squad ( - tquat const & q1, - tquat const & q2, - tquat const & s1, - tquat const & s2, - T const & h) + tquat const& q1, + tquat const& q2, + tquat const& s1, + tquat const& s2, + T const& h) { return mix(mix(q1, q2, h), mix(s1, s2, h), static_cast(2) * (static_cast(1) - h) * h); } @@ -39,9 +39,9 @@ namespace glm template GLM_FUNC_QUALIFIER tquat intermediate ( - tquat const & prev, - tquat const & curr, - tquat const & next + tquat const& prev, + tquat const& curr, + tquat const& next ) { tquat invQuat = inverse(curr); @@ -173,7 +173,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER tquat fastMix(tquat const& x, tquat const& y, T const & a) + GLM_FUNC_QUALIFIER tquat fastMix(tquat const& x, tquat const& y, T const& a) { return glm::normalize(x * (static_cast(1) - a) + (y * a)); } diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index 98c294de..99ab0183 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -32,43 +32,43 @@ namespace glm /// @{ template - inline length_t components(vec<1, T, P> const & v) + inline length_t components(vec<1, T, P> const& v) { return v.length(); } template - inline length_t components(vec<2, T, P> const & v) + inline length_t components(vec<2, T, P> const& v) { return v.length(); } template - inline length_t components(vec<3, T, P> const & v) + inline length_t components(vec<3, T, P> const& v) { return v.length(); } template - inline length_t components(vec<4, T, P> const & v) + inline length_t components(vec<4, T, P> const& v) { return v.length(); } template - inline length_t components(genType const & m) + inline length_t components(genType const& m) { return m.length() * m[0].length(); } template - inline typename genType::value_type const * begin(genType const & v) + inline typename genType::value_type const * begin(genType const& v) { return value_ptr(v); } template - inline typename genType::value_type const * end(genType const & v) + inline typename genType::value_type const * end(genType const& v) { return begin(v) + components(v); } diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp index 6a384ec8..8badfdc5 100644 --- a/glm/gtx/rotate_normalized_axis.hpp +++ b/glm/gtx/rotate_normalized_axis.hpp @@ -41,13 +41,13 @@ namespace glm /// /// @see gtx_rotate_normalized_axis /// @see - rotate(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(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) template GLM_FUNC_DECL mat<4, 4, T, P> rotateNormalizedAxis( mat<4, 4, T, P> const& m, - T const & angle, - vec<3, T, P> const & axis); + T const& angle, + vec<3, T, P> const& axis); /// Rotates a quaternion from a vector of 3 components normalized axis and an angle. /// @@ -58,9 +58,9 @@ namespace glm /// @see gtx_rotate_normalized_axis template GLM_FUNC_DECL tquat rotateNormalizedAxis( - tquat const & q, - T const & angle, - vec<3, T, P> const & axis); + tquat const& q, + T const& angle, + vec<3, T, P> const& axis); /// @} }//namespace glm diff --git a/glm/gtx/rotate_normalized_axis.inl b/glm/gtx/rotate_normalized_axis.inl index 4a99fee7..51f485fd 100644 --- a/glm/gtx/rotate_normalized_axis.inl +++ b/glm/gtx/rotate_normalized_axis.inl @@ -7,8 +7,8 @@ namespace glm GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotateNormalizedAxis ( mat<4, 4, T, P> const& m, - T const & angle, - vec<3, T, P> const & v + T const& angle, + vec<3, T, P> const& v ) { T const a = angle; @@ -43,9 +43,9 @@ namespace glm template GLM_FUNC_QUALIFIER tquat rotateNormalizedAxis ( - tquat const & q, - T const & angle, - vec<3, T, P> const & v + tquat const& q, + T const& angle, + vec<3, T, P> const& v ) { vec<3, T, P> const Tmp(v); diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index d74c091d..50a18128 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -39,81 +39,81 @@ namespace glm /// @see gtx_rotate_vector template GLM_FUNC_DECL vec<3, T, P> slerp( - vec<3, T, P> const & x, - vec<3, T, P> const & y, - T const & a); + vec<3, T, P> const& x, + vec<3, T, P> const& y, + T const& a); //! Rotate a two dimensional vector. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<2, T, P> rotate( - vec<2, T, P> const & v, - T const & angle); + vec<2, T, P> const& v, + T const& angle); //! Rotate a three dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<3, T, P> rotate( - vec<3, T, P> const & v, - T const & angle, - vec<3, T, P> const & normal); + vec<3, T, P> const& v, + T const& angle, + vec<3, T, P> const& normal); //! Rotate a four dimensional vector around an axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<4, T, P> rotate( - vec<4, T, P> const & v, - T const & angle, - vec<3, T, P> const & normal); + vec<4, T, P> const& v, + T const& angle, + vec<3, T, P> const& normal); //! Rotate a three dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<3, T, P> rotateX( - vec<3, T, P> const & v, - T const & angle); + vec<3, T, P> const& v, + T const& angle); //! Rotate a three dimensional vector around the Y axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<3, T, P> rotateY( - vec<3, T, P> const & v, - T const & angle); + vec<3, T, P> const& v, + T const& angle); //! Rotate a three dimensional vector around the Z axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<3, T, P> rotateZ( - vec<3, T, P> const & v, - T const & angle); + vec<3, T, P> const& v, + T const& angle); //! Rotate a four dimensional vector around the X axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<4, T, P> rotateX( - vec<4, T, P> const & v, - T const & angle); + vec<4, T, P> const& v, + T const& angle); //! Rotate a four dimensional vector around the Y axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<4, T, P> rotateY( - vec<4, T, P> const & v, - T const & angle); + vec<4, T, P> const& v, + T const& angle); //! Rotate a four dimensional vector around the Z axis. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL vec<4, T, P> rotateZ( - vec<4, T, P> const & v, - T const & angle); + vec<4, T, P> const& v, + T const& angle); //! Build a rotation matrix from a normal and a up vector. //! From GLM_GTX_rotate_vector extension. template GLM_FUNC_DECL mat<4, 4, T, P> orientation( - vec<3, T, P> const & Normal, - vec<3, T, P> const & Up); + vec<3, T, P> const& Normal, + vec<3, T, P> const& Up); /// @} }//namespace glm diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index d9db3f32..07cc4895 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -6,9 +6,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> slerp ( - vec<3, T, P> const & x, - vec<3, T, P> const & y, - T const & a + vec<3, T, P> const& x, + vec<3, T, P> const& y, + T const& a ) { // get cosine of angle between vectors (-1 -> 1) @@ -28,8 +28,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<2, T, P> rotate ( - vec<2, T, P> const & v, - T const & angle + vec<2, T, P> const& v, + T const& angle ) { vec<2, T, P> Result; @@ -44,9 +44,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rotate ( - vec<3, T, P> const & v, - T const & angle, - vec<3, T, P> const & normal + vec<3, T, P> const& v, + T const& angle, + vec<3, T, P> const& normal ) { return mat<3, 3, T, P>(glm::rotate(angle, normal)) * v; @@ -66,9 +66,9 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, T, P> rotate ( - vec<4, T, P> const & v, - T const & angle, - vec<3, T, P> const & normal + vec<4, T, P> const& v, + T const& angle, + vec<3, T, P> const& normal ) { return rotate(angle, normal) * v; @@ -77,8 +77,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rotateX ( - vec<3, T, P> const & v, - T const & angle + vec<3, T, P> const& v, + T const& angle ) { vec<3, T, P> Result(v); @@ -93,8 +93,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rotateY ( - vec<3, T, P> const & v, - T const & angle + vec<3, T, P> const& v, + T const& angle ) { vec<3, T, P> Result = v; @@ -109,8 +109,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<3, T, P> rotateZ ( - vec<3, T, P> const & v, - T const & angle + vec<3, T, P> const& v, + T const& angle ) { vec<3, T, P> Result = v; @@ -125,8 +125,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, T, P> rotateX ( - vec<4, T, P> const & v, - T const & angle + vec<4, T, P> const& v, + T const& angle ) { vec<4, T, P> Result = v; @@ -141,8 +141,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, T, P> rotateY ( - vec<4, T, P> const & v, - T const & angle + vec<4, T, P> const& v, + T const& angle ) { vec<4, T, P> Result = v; @@ -157,8 +157,8 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, T, P> rotateZ ( - vec<4, T, P> const & v, - T const & angle + vec<4, T, P> const& v, + T const& angle ) { vec<4, T, P> Result = v; @@ -173,8 +173,8 @@ namespace glm template GLM_FUNC_QUALIFIER mat<4, 4, T, P> orientation ( - vec<3, T, P> const & Normal, - vec<3, T, P> const & Up + vec<3, T, P> const& Normal, + vec<3, T, P> const& Up ) { if(all(equal(Normal, Up))) diff --git a/glm/gtx/scalar_multiplication.hpp b/glm/gtx/scalar_multiplication.hpp index 568391c1..0511634d 100644 --- a/glm/gtx/scalar_multiplication.hpp +++ b/glm/gtx/scalar_multiplication.hpp @@ -39,19 +39,19 @@ namespace glm #define GLM_IMPLEMENT_SCAL_MULT(Vec) \ template \ return_type_scalar_multiplication \ - operator*(T const & s, Vec rh){ \ + operator*(T const& s, Vec rh){ \ return rh *= static_cast(s); \ } \ \ template \ return_type_scalar_multiplication \ - operator*(Vec lh, T const & s){ \ + operator*(Vec lh, T const& s){ \ return lh *= static_cast(s); \ } \ \ template \ return_type_scalar_multiplication \ - operator/(Vec lh, T const & s){ \ + operator/(Vec lh, T const& s){ \ return lh *= 1.0f / s; \ } diff --git a/glm/gtx/scalar_relational.inl b/glm/gtx/scalar_relational.inl index e044efb4..e089e2a7 100644 --- a/glm/gtx/scalar_relational.inl +++ b/glm/gtx/scalar_relational.inl @@ -6,8 +6,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool lessThan ( - T const & x, - T const & y + T const& x, + T const& y ) { return x < y; @@ -16,8 +16,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool lessThanEqual ( - T const & x, - T const & y + T const& x, + T const& y ) { return x <= y; @@ -26,8 +26,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool greaterThan ( - T const & x, - T const & y + T const& x, + T const& y ) { return x > y; @@ -36,8 +36,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool greaterThanEqual ( - T const & x, - T const & y + T const& x, + T const& y ) { return x >= y; @@ -46,8 +46,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool equal ( - T const & x, - T const & y + T const& x, + T const& y ) { return detail::compute_equal::call(x, y); @@ -56,8 +56,8 @@ namespace glm template GLM_FUNC_QUALIFIER bool notEqual ( - T const & x, - T const & y + T const& x, + T const& y ) { return !detail::compute_equal::call(x, y); @@ -65,7 +65,7 @@ namespace glm GLM_FUNC_QUALIFIER bool any ( - bool const & x + bool const& x ) { return x; @@ -73,7 +73,7 @@ namespace glm GLM_FUNC_QUALIFIER bool all ( - bool const & x + bool const& x ) { return x; @@ -81,7 +81,7 @@ namespace glm GLM_FUNC_QUALIFIER bool not_ ( - bool const & x + bool const& x ) { return !x; diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 28fb7738..7b807ec1 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -33,31 +33,31 @@ namespace glm /// @see gtx_spline extension. template GLM_FUNC_DECL genType catmullRom( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + genType const& v1, + genType const& v2, + genType const& v3, + genType const& v4, + typename genType::value_type const& s); /// Return a point from a hermite curve. /// @see gtx_spline extension. template GLM_FUNC_DECL genType hermite( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s); + genType const& v1, + genType const& t1, + genType const& v2, + genType const& t2, + typename genType::value_type const& s); /// Return a point from a cubic curve. /// @see gtx_spline extension. template GLM_FUNC_DECL genType cubic( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + genType const& v1, + genType const& v2, + genType const& v3, + genType const& v4, + typename genType::value_type const& s); /// @} }//namespace glm diff --git a/glm/gtx/spline.inl b/glm/gtx/spline.inl index 5f3c3d9d..a60a0b77 100644 --- a/glm/gtx/spline.inl +++ b/glm/gtx/spline.inl @@ -6,11 +6,11 @@ namespace glm template GLM_FUNC_QUALIFIER genType catmullRom ( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s + genType const& v1, + genType const& v2, + genType const& v3, + genType const& v4, + typename genType::value_type const& s ) { typename genType::value_type s2 = pow2(s); @@ -28,11 +28,11 @@ namespace glm template GLM_FUNC_QUALIFIER genType hermite ( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s + genType const& v1, + genType const& t1, + genType const& v2, + genType const& t2, + typename genType::value_type const& s ) { typename genType::value_type s2 = pow2(s); @@ -49,11 +49,11 @@ namespace glm template GLM_FUNC_QUALIFIER genType cubic ( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s + genType const& v1, + genType const& v2, + genType const& v3, + genType const& v4, + typename genType::value_type const& s ) { return ((v1 * s + v2) * s + v3) * s + v4; diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index 453dff48..df867eb3 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -144,7 +144,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<1, bool, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<1, bool, P> const& x) { return detail::format("bvec1(%s)", x[0] ? detail::LabelTrue : detail::LabelFalse); @@ -154,7 +154,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<2, bool, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<2, bool, P> const& x) { return detail::format("bvec2(%s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -165,7 +165,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<3, bool, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<3, bool, P> const& x) { return detail::format("bvec3(%s, %s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -177,7 +177,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<4, bool, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<4, bool, P> const& x) { return detail::format("bvec4(%s, %s, %s, %s)", x[0] ? detail::LabelTrue : detail::LabelFalse, @@ -190,7 +190,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<1, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<1, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -206,7 +206,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<2, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<2, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -223,7 +223,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<3, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<3, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -241,7 +241,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(vec<4, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(vec<4, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -261,7 +261,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<2, 2, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<2, 2, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -279,7 +279,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<2, 3, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<2, 3, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -297,7 +297,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<2, 4, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<2, 4, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -315,7 +315,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<3, 2, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<3, 2, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -335,7 +335,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<3, 3, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<3, 3, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -355,7 +355,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<3, 4, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<3, 4, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -375,7 +375,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<4, 2, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<4, 2, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -397,7 +397,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<4, 3, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<4, 3, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -419,7 +419,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(mat<4, 4, T, P> const & x) + GLM_FUNC_QUALIFIER static std::string call(mat<4, 4, T, P> const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -442,7 +442,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(tquat const & x) + GLM_FUNC_QUALIFIER static std::string call(tquat const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); @@ -461,7 +461,7 @@ namespace detail template struct compute_to_string > { - GLM_FUNC_QUALIFIER static std::string call(tdualquat const & x) + GLM_FUNC_QUALIFIER static std::string call(tdualquat const& x) { char const * PrefixStr = prefix::value(); char const * LiteralStr = literal::is_iec559>::value(); diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index fd8870fe..b765f236 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -37,7 +37,7 @@ namespace glm /// @see gtx_transform template GLM_FUNC_DECL mat<4, 4, T, P> translate( - vec<3, T, P> const & v); + vec<3, T, P> const& v); /// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in radians. /// @see gtc_matrix_transform @@ -45,14 +45,14 @@ namespace glm template GLM_FUNC_DECL mat<4, 4, T, P> rotate( T angle, - vec<3, T, P> const & v); + vec<3, T, P> const& v); /// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. /// @see gtc_matrix_transform /// @see gtx_transform template GLM_FUNC_DECL mat<4, 4, T, P> scale( - vec<3, T, P> const & v); + vec<3, T, P> const& v); /// @} }// namespace glm diff --git a/glm/gtx/transform.inl b/glm/gtx/transform.inl index 44fd9aa3..ad027ffb 100644 --- a/glm/gtx/transform.inl +++ b/glm/gtx/transform.inl @@ -4,19 +4,19 @@ namespace glm { template - GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER mat<4, 4, T, P> translate(vec<3, T, P> const& v) { return translate(mat<4, 4, T, P>(static_cast(1)), v); } template - GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(T angle, vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER mat<4, 4, T, P> rotate(T angle, vec<3, T, P> const& v) { return rotate(mat<4, 4, T, P>(static_cast(1)), angle, v); } template - GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(vec<3, T, P> const & v) + GLM_FUNC_QUALIFIER mat<4, 4, T, P> scale(vec<3, T, P> const& v) { return scale(mat<4, 4, T, P>(static_cast(1)), v); } diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index 66343153..e1be6c96 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -101,7 +101,7 @@ namespace glm //! From GLM_GTX_transform2 extension. template GLM_FUNC_DECL mat<4, 4, valType, P> scaleBias( - mat<4, 4, valType, P> const & m, + mat<4, 4, valType, P> const& m, valType scale, valType bias); diff --git a/glm/gtx/vector_angle.inl b/glm/gtx/vector_angle.inl index c2539aeb..6d6ce66d 100644 --- a/glm/gtx/vector_angle.inl +++ b/glm/gtx/vector_angle.inl @@ -6,8 +6,8 @@ namespace glm template GLM_FUNC_QUALIFIER genType angle ( - genType const & x, - genType const & y + genType const& x, + genType const& y ) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'angle' only accept floating-point inputs"); @@ -23,7 +23,7 @@ namespace glm //! \todo epsilon is hard coded to 0.01 template - GLM_FUNC_QUALIFIER T orientedAngle(vec<2, T, P> const & x, vec<2, T, P> const & y) + GLM_FUNC_QUALIFIER T orientedAngle(vec<2, T, P> const& x, vec<2, T, P> const& y) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 39422185..0cad1b4c 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -33,32 +33,32 @@ namespace glm //! Check whether two vectors are collinears. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL bool areCollinear(vec const & v0, vec const & v1, T const & epsilon); + GLM_FUNC_DECL bool areCollinear(vec const& v0, vec const& v1, T const& epsilon); //! Check whether two vectors are orthogonals. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL bool areOrthogonal(vec const & v0, vec const & v1, T const & epsilon); + GLM_FUNC_DECL bool areOrthogonal(vec const& v0, vec const& v1, T const& epsilon); //! Check whether a vector is normalized. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL bool isNormalized(vec const & v, T const & epsilon); + GLM_FUNC_DECL bool isNormalized(vec const& v, T const& epsilon); //! Check whether a vector is null. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL bool isNull(vec const & v, T const & epsilon); + GLM_FUNC_DECL bool isNull(vec const& v, T const& epsilon); //! Check whether a each component of a vector is null. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL vec isCompNull(vec const & v, T const & epsilon); + GLM_FUNC_DECL vec isCompNull(vec const& v, T const& epsilon); //! Check whether two vectors are orthonormal. /// @see gtx_vector_query extensions. template - GLM_FUNC_DECL bool areOrthonormal(vec const & v0, vec const & v1, T const & epsilon); + GLM_FUNC_DECL bool areOrthonormal(vec const& v0, vec const& v1, T const& epsilon); /// @} }// namespace glm diff --git a/glm/gtx/vector_query.inl b/glm/gtx/vector_query.inl index 34ddfc32..5439f2d9 100644 --- a/glm/gtx/vector_query.inl +++ b/glm/gtx/vector_query.inl @@ -12,7 +12,7 @@ namespace detail template struct compute_areCollinear<2, T, P> { - GLM_FUNC_QUALIFIER static bool call(vec<2, T, P> const & v0, vec<2, T, P> const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<2, T, P> const& v0, vec<2, T, P> const& v1, T const& epsilon) { return length(cross(vec<3, T, P>(v0, static_cast(0)), vec<3, T, P>(v1, static_cast(0)))) < epsilon; } @@ -21,7 +21,7 @@ namespace detail template struct compute_areCollinear<3, T, P> { - GLM_FUNC_QUALIFIER static bool call(vec<3, T, P> const & v0, vec<3, T, P> const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<3, T, P> const& v0, vec<3, T, P> const& v1, T const& epsilon) { return length(cross(v0, v1)) < epsilon; } @@ -30,7 +30,7 @@ namespace detail template struct compute_areCollinear<4, T, P> { - GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const & v0, vec<4, T, P> const & v1, T const & epsilon) + GLM_FUNC_QUALIFIER static bool call(vec<4, T, P> const& v0, vec<4, T, P> const& v1, T const& epsilon) { return length(cross(vec<3, T, P>(v0), vec<3, T, P>(v1))) < epsilon; } @@ -42,7 +42,7 @@ namespace detail template struct compute_isCompNull<2, T, P> { - GLM_FUNC_QUALIFIER static vec<2, bool, P> call(vec<2, T, P> const & v, T const & epsilon) + GLM_FUNC_QUALIFIER static vec<2, bool, P> call(vec<2, T, P> const& v, T const& epsilon) { return vec<2, bool, P>( (abs(v.x) < epsilon), @@ -53,7 +53,7 @@ namespace detail template struct compute_isCompNull<3, T, P> { - GLM_FUNC_QUALIFIER static vec<3, bool, P> call(vec<3, T, P> const & v, T const & epsilon) + GLM_FUNC_QUALIFIER static vec<3, bool, P> call(vec<3, T, P> const& v, T const& epsilon) { return vec<3, bool, P>( (abs(v.x) < epsilon), @@ -65,7 +65,7 @@ namespace detail template struct compute_isCompNull<4, T, P> { - GLM_FUNC_QUALIFIER static vec<4, bool, P> call(vec<4, T, P> const & v, T const& epsilon) + GLM_FUNC_QUALIFIER static vec<4, bool, P> call(vec<4, T, P> const& v, T const& epsilon) { return vec<4, bool, P>( (abs(v.x) < epsilon), @@ -120,7 +120,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<2, bool, P> isCompNull(vec<2, T, P> const & v, T const & epsilon) + GLM_FUNC_QUALIFIER vec<2, bool, P> isCompNull(vec<2, T, P> const& v, T const& epsilon) { return vec<2, bool, P>( abs(v.x) < epsilon, @@ -128,7 +128,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<3, bool, P> isCompNull(vec<3, T, P> const & v, T const& epsilon) + GLM_FUNC_QUALIFIER vec<3, bool, P> isCompNull(vec<3, T, P> const& v, T const& epsilon) { return vec<3, bool, P>( abs(v.x) < epsilon, @@ -137,7 +137,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER vec<4, bool, P> isCompNull(vec<4, T, P> const & v, T const & epsilon) + GLM_FUNC_QUALIFIER vec<4, bool, P> isCompNull(vec<4, T, P> const& v, T const& epsilon) { return vec<4, bool, P>( abs(v.x) < epsilon, @@ -147,7 +147,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER bool areOrthonormal(vec const& v0, vec const& v1, T const & epsilon) + GLM_FUNC_QUALIFIER bool areOrthonormal(vec const& v0, vec const& v1, T const& epsilon) { return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); } diff --git a/glm/gtx/wrap.inl b/glm/gtx/wrap.inl index ff08f960..cdbfc63e 100644 --- a/glm/gtx/wrap.inl +++ b/glm/gtx/wrap.inl @@ -10,7 +10,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) + GLM_FUNC_QUALIFIER genType clamp(genType const& Texcoord) { return clamp(vec<1, genType, defaultp>(Texcoord)).x; } @@ -22,7 +22,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER genType repeat(genType const & Texcoord) + GLM_FUNC_QUALIFIER genType repeat(genType const& Texcoord) { return repeat(vec<1, genType, defaultp>(Texcoord)).x; } @@ -34,7 +34,7 @@ namespace glm } template - GLM_FUNC_QUALIFIER genType mirrorClamp(genType const & Texcoord) + GLM_FUNC_QUALIFIER genType mirrorClamp(genType const& Texcoord) { return mirrorClamp(vec<1, genType, defaultp>(Texcoord)).x; } diff --git a/glm/simd/matrix.h b/glm/simd/matrix.h index 23cf4806..f1602dc2 100644 --- a/glm/simd/matrix.h +++ b/glm/simd/matrix.h @@ -1017,7 +1017,7 @@ GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float c sse_mul_ps(in, Result, out); } */ -GLM_FUNC_QUALIFIER void glm_mat4_outerProduct(__m128 const & c, __m128 const & r, __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_outerProduct(__m128 const& c, __m128 const& r, __m128 out[4]) { out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0))); out[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1))); diff --git a/manual.md b/manual.md index 31a33063..1762bf77 100644 --- a/manual.md +++ b/manual.md @@ -446,7 +446,7 @@ GLSL supports the member function .length() for all vector and matrix types. ```cpp #include -void foo(vec4 const & v) +void foo(vec4 const& v) { int Length = v.length(); ... @@ -461,7 +461,7 @@ Additionally, GLM defines the type glm::length\_t to identify length() returned #define GLM_FORCE_SIZE_T_LENGTH #include -void foo(vec4 const & v) +void foo(vec4 const& v) { glm::length_t Length = v.length(); ... @@ -969,8 +969,8 @@ From GLM\_GTC\_matrix\_transform extension: <glm/gtc/matrix\_transform.hpp> [***gluProject:***](http://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml) ```cpp -glm::vec3 project(glm::vec3 const& obj, glm::mat4 const& model, glm::mat4 const & proj, glm::ivec4 const& viewport); -glm::dvec3 project(glm::dvec3 const& obj, glm::dmat4 const & model, glm::dmat4 const & proj, glm::ivec4 const& viewport); +glm::vec3 project(glm::vec3 const& obj, glm::mat4 const& model, glm::mat4 const& proj, glm::ivec4 const& viewport); +glm::dvec3 project(glm::dvec3 const& obj, glm::dmat4 const& model, glm::dmat4 const& proj, glm::ivec4 const& viewport); ``` From GLM\_GTC\_matrix\_transform extension: <glm/gtc/matrix\_transform.hpp> @@ -979,7 +979,7 @@ From GLM\_GTC\_matrix\_transform extension: <glm/gtc/matrix\_transform.hpp> ```cpp glm::vec3 unProject(glm::vec3 const& win, glm::mat4 const& model, glm::mat4 const& proj, glm::ivec4 const& viewport); -glm::dvec3 unProject(glm::dvec3 const& win, glm::dmat4 const& model, glm::dmat4 const& proj, glm::ivec4 const & viewport); +glm::dvec3 unProject(glm::dvec3 const& win, glm::dmat4 const& model, glm::dmat4 const& proj, glm::ivec4 const& viewport); ``` From GLM\_GTC\_matrix\_transform extension: <glm/gtc/matrix\_transform.hpp> diff --git a/readme.md b/readme.md index 801a5a69..1587156a 100644 --- a/readme.md +++ b/readme.md @@ -29,7 +29,7 @@ Thanks for contributing to the project by [submitting issues](https://github.com #include // glm::translate, glm::rotate, glm::scale, glm::perspective #include // glm::pi -glm::mat4 camera(float Translate, glm::vec2 const & Rotate) +glm::mat4 camera(float Translate, glm::vec2 const& Rotate) { glm::mat4 Projection = glm::perspective(glm::pi() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f); glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); diff --git a/test/core/core_func_integer.cpp b/test/core/core_func_integer.cpp index 55a06c5f..75cc57b8 100644 --- a/test/core/core_func_integer.cpp +++ b/test/core/core_func_integer.cpp @@ -198,7 +198,7 @@ namespace bitfieldReverse struct compute_bitfieldReverseStep { template - GLM_FUNC_QUALIFIER static glm::vec call(glm::vec const & v, T, T) + GLM_FUNC_QUALIFIER static glm::vec call(glm::vec const& v, T, T) { return v; } @@ -208,14 +208,14 @@ namespace bitfieldReverse struct compute_bitfieldReverseStep { template - GLM_FUNC_QUALIFIER static glm::vec call(glm::vec const & v, T Mask, T Shift) + GLM_FUNC_QUALIFIER static glm::vec call(glm::vec const& v, T Mask, T Shift) { return (v & Mask) << Shift | (v & (~Mask)) >> Shift; } }; template - GLM_FUNC_QUALIFIER glm::vec bitfieldReverseOps(glm::vec const & v) + GLM_FUNC_QUALIFIER glm::vec bitfieldReverseOps(glm::vec const& v) { glm::vec x(v); x = compute_bitfieldReverseStep= 2>::call(x, T(0x5555555555555555ull), static_cast( 1)); @@ -1415,7 +1415,7 @@ namespace bitCount }; template - static glm::vec bitCount_bitfield(glm::vec const & v) + static glm::vec bitCount_bitfield(glm::vec const& v) { glm::vec::type, P> x(*reinterpret_cast::type, P> const *>(&v)); x = compute_bitfieldBitCountStep= 2>::call(x, typename glm::detail::make_unsigned::type(0x5555555555555555ull), typename glm::detail::make_unsigned::type( 1)); diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index fccecc48..827ac720 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -27,7 +27,7 @@ enum comp }; //template -//__m128 swizzle(glm::vec4 const & v) +//__m128 swizzle(glm::vec4 const& v) //{ // __m128 Src = _mm_set_ps(v.w, v.z, v.y, v.x); // return _mm_shuffle_ps(Src, Src, mask<(int(W) << 6) | (int(Z) << 4) | (int(Y) << 2) | (int(X) << 0)>::value); diff --git a/test/gtc/gtc_packing.cpp b/test/gtc/gtc_packing.cpp index 98b2f9d6..4b7e4de7 100644 --- a/test/gtc/gtc_packing.cpp +++ b/test/gtc/gtc_packing.cpp @@ -3,7 +3,7 @@ #include #include -void print_bits(float const & s) +void print_bits(float const& s) { union { @@ -22,7 +22,7 @@ void print_bits(float const & s) } } -void print_10bits(glm::uint const & s) +void print_10bits(glm::uint const& s) { printf("10b: "); for(std::size_t j = 10; j > 0; --j) @@ -33,7 +33,7 @@ void print_10bits(glm::uint const & s) } } -void print_11bits(glm::uint const & s) +void print_11bits(glm::uint const& s) { printf("11b: "); for(std::size_t j = 11; j > 0; --j) @@ -44,7 +44,7 @@ void print_11bits(glm::uint const & s) } } -void print_value(float const & s) +void print_value(float const& s) { printf("%2.5f, ", static_cast(s)); print_bits(s); diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index ffb7e438..4159b7e0 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -178,7 +178,7 @@ namespace taylorCos glm::vec4 const AngleShift(0.0f, glm::half_pi(), glm::pi(), glm::three_over_two_pi()); template - GLM_FUNC_QUALIFIER glm::vec taylorSeriesNewCos(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec taylorSeriesNewCos(glm::vec const& x) { glm::vec const Powed2(x * x); glm::vec const Powed4(Powed2 * Powed2); @@ -193,7 +193,7 @@ namespace taylorCos } template - GLM_FUNC_QUALIFIER glm::vec taylorSeriesNewCos6(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec taylorSeriesNewCos6(glm::vec const& x) { glm::vec const Powed2(x * x); glm::vec const Powed4(Powed2 * Powed2); @@ -217,7 +217,7 @@ namespace taylorCos } template - GLM_FUNC_QUALIFIER glm::vec fastCosNew(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec fastCosNew(glm::vec const& x) { glm::vec const Angle0_PI(fastAbs(fmod(x + glm::pi(), glm::two_pi()) - glm::pi())); return taylorSeriesNewCos6(x); @@ -255,13 +255,13 @@ namespace taylorCos } template - GLM_FUNC_QUALIFIER glm::vec deterministic_fmod(glm::vec const & x, T y) + GLM_FUNC_QUALIFIER glm::vec deterministic_fmod(glm::vec const& x, T y) { return x - y * trunc(x / y); } template - GLM_FUNC_QUALIFIER glm::vec fastCosDeterminisctic(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec fastCosDeterminisctic(glm::vec const& x) { glm::vec const Angle0_PI(abs(deterministic_fmod(x + glm::pi(), glm::two_pi()) - glm::pi())); glm::vec const FirstQuarterPi(lessThanEqual(Angle0_PI, glm::vec(glm::half_pi()))); @@ -296,7 +296,7 @@ namespace taylorCos } template - GLM_FUNC_QUALIFIER glm::vec taylorSeriesRefCos(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec taylorSeriesRefCos(glm::vec const& x) { return static_cast(1) - (x * x) / glm::factorial(static_cast(2)) @@ -306,7 +306,7 @@ namespace taylorCos } template - GLM_FUNC_QUALIFIER glm::vec fastRefCos(glm::vec const & x) + GLM_FUNC_QUALIFIER glm::vec fastRefCos(glm::vec const& x) { glm::vec const Angle0_PI(glm::abs(fmod(x + glm::pi(), glm::two_pi()) - glm::pi())); // return taylorSeriesRefCos(Angle0_PI);