From b9266c07b0cee2a067efd2b9af802e25d761776d Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 8 Sep 2013 00:22:17 +0200 Subject: [PATCH] Using C++ casts --- glm/core/_vectorize.hpp | 6 +- glm/core/func_common.hpp | 16 +- glm/core/func_common.inl | 50 +--- glm/core/func_geometric.hpp | 2 +- glm/core/func_geometric.inl | 2 +- glm/core/func_noise.inl | 16 +- glm/core/func_packing.inl | 14 +- glm/core/type_gentype.hpp | 10 +- glm/core/type_gentype.inl | 10 +- glm/core/type_mat2x2.hpp | 22 +- glm/core/type_mat2x2.inl | 28 +-- glm/core/type_mat2x3.hpp | 18 +- glm/core/type_mat2x3.inl | 24 +- glm/core/type_mat2x4.hpp | 18 +- glm/core/type_mat2x4.inl | 24 +- glm/core/type_mat3x2.hpp | 20 +- glm/core/type_mat3x2.inl | 28 +-- glm/core/type_mat3x3.hpp | 24 +- glm/core/type_mat3x3.inl | 32 +-- glm/core/type_mat3x4.hpp | 20 +- glm/core/type_mat3x4.inl | 28 +-- glm/core/type_mat4x2.hpp | 22 +- glm/core/type_mat4x2.inl | 50 ++-- glm/core/type_mat4x3.hpp | 22 +- glm/core/type_mat4x3.inl | 48 ++-- glm/core/type_mat4x4.hpp | 26 +-- glm/core/type_mat4x4.inl | 48 ++-- glm/core/type_vec1.hpp | 4 +- glm/core/type_vec1.inl | 96 ++++---- glm/core/type_vec2.hpp | 8 +- glm/core/type_vec2.inl | 234 +++++++++---------- glm/core/type_vec3.hpp | 10 +- glm/core/type_vec3.inl | 266 ++++++++++----------- glm/core/type_vec4.hpp | 52 ++--- glm/core/type_vec4.inl | 364 ++++++++++++++--------------- glm/gtc/angle.hpp | 2 +- glm/gtc/epsilon.hpp | 4 +- glm/gtc/matrix_transform.inl | 12 +- glm/gtc/noise.inl | 22 +- glm/gtc/quaternion.hpp | 16 +- glm/gtc/quaternion.inl | 26 +-- glm/gtx/color_space.inl | 16 +- glm/gtx/dual_quaternion.hpp | 12 +- glm/gtx/dual_quaternion.inl | 34 +-- glm/gtx/euler_angles.inl | 28 +-- glm/gtx/extented_min_max.hpp | 20 +- glm/gtx/extented_min_max.inl | 20 +- glm/gtx/fast_exponential.inl | 2 +- glm/gtx/inertia.inl | 18 +- glm/gtx/integer.inl | 2 +- glm/gtx/matrix_interpolation.inl | 4 +- glm/gtx/matrix_query.hpp | 2 +- glm/gtx/matrix_query.inl | 2 +- glm/gtx/quaternion.inl | 14 +- glm/gtx/rotate_normalized_axis.hpp | 2 +- glm/gtx/rotate_normalized_axis.inl | 2 +- glm/gtx/simd_quat.inl | 2 +- glm/gtx/spline.hpp | 6 +- glm/gtx/spline.inl | 6 +- glm/gtx/vector_query.hpp | 6 +- glm/gtx/vector_query.inl | 10 +- readme.txt | 1 + test/core/core_func_swizzle.cpp | 2 +- test/gtc/gtc_epsilon.cpp | 12 +- 64 files changed, 966 insertions(+), 1001 deletions(-) diff --git a/glm/core/_vectorize.hpp b/glm/core/_vectorize.hpp index 0e2ff1ad..b1fb60e6 100644 --- a/glm/core/_vectorize.hpp +++ b/glm/core/_vectorize.hpp @@ -72,7 +72,7 @@ GLM_FUNC_QUALIFIER detail::tvec2 func \ ( \ detail::tvec2 const & x, \ - typename detail::tvec2::value_type const & y \ + typename detail::tvec2::T const & y \ ) \ { \ return detail::tvec2( \ @@ -85,7 +85,7 @@ GLM_FUNC_QUALIFIER detail::tvec3 func \ ( \ detail::tvec3 const & x, \ - typename detail::tvec3::value_type const & y \ + typename detail::tvec3::T const & y \ ) \ { \ return detail::tvec3( \ @@ -99,7 +99,7 @@ GLM_FUNC_QUALIFIER detail::tvec4 func \ ( \ detail::tvec4 const & x, \ - typename detail::tvec4::value_type const & y \ + typename detail::tvec4::T const & y \ ) \ { \ return detail::tvec4( \ diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index 60dec236..8d1a6dfd 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -147,7 +147,7 @@ namespace glm template GLM_FUNC_DECL genType mod( genType const & x, - typename genType::value_type const & y); + typename genType::T const & y); /// Returns the fractional part of x and sets i to the integer /// part (as a whole number floating point value). Both the @@ -177,7 +177,7 @@ namespace glm template GLM_FUNC_DECL genType min( genType const & x, - typename genType::value_type const & y); + typename genType::T const & y); /// Returns y if x < y; otherwise, it returns x. /// @@ -193,7 +193,7 @@ namespace glm template GLM_FUNC_DECL genType max( genType const & x, - typename genType::value_type const & y); + typename genType::T const & y); /// Returns min(max(x, minVal), maxVal) for each component in x /// using the floating-point values minVal and maxVal. @@ -211,8 +211,8 @@ namespace glm template GLM_FUNC_DECL genType clamp( genType const & x, - typename genType::value_type const & minVal, - typename genType::value_type const & maxVal); + typename genType::T const & minVal, + typename genType::T const & maxVal); /// If genTypeU is a floating scalar or vector: /// Returns x * (1.0 - a) + y * a, i.e., the linear blend of @@ -273,7 +273,7 @@ namespace glm template GLM_FUNC_DECL genType step( - typename genType::value_type const & edge, + typename genType::T const & edge, genType const & x); /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and @@ -298,8 +298,8 @@ namespace glm template GLM_FUNC_DECL genType smoothstep( - typename genType::value_type const & edge0, - typename genType::value_type const & edge1, + typename genType::T const & edge0, + typename genType::T const & edge1, genType const & x); /// Returns true if x holds a NaN (not a number) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index cc615dd4..bd9ed682 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -346,8 +346,8 @@ namespace detail GLM_FUNC_QUALIFIER detail::tvec3 clamp ( detail::tvec3 const & x, - typename detail::tvec3::value_type const & minVal, - typename detail::tvec3::value_type const & maxVal + typename detail::tvec3::T const & minVal, + typename detail::tvec3::T const & maxVal ) { return detail::tvec3( @@ -360,8 +360,8 @@ namespace detail GLM_FUNC_QUALIFIER detail::tvec4 clamp ( detail::tvec4 const & x, - typename detail::tvec4::value_type const & minVal, - typename detail::tvec4::value_type const & maxVal + typename detail::tvec4::T const & minVal, + typename detail::tvec4::T const & maxVal ) { return detail::tvec4( @@ -656,7 +656,7 @@ namespace detail template GLM_FUNC_QUALIFIER detail::tvec2 step ( - typename detail::tvec2::value_type const & edge, + typename detail::tvec2::T const & edge, detail::tvec2 const & x ) { @@ -668,7 +668,7 @@ namespace detail template GLM_FUNC_QUALIFIER detail::tvec3 step ( - typename detail::tvec3::value_type const & edge, + typename detail::tvec3::T const & edge, detail::tvec3 const & x ) { @@ -681,7 +681,7 @@ namespace detail template GLM_FUNC_QUALIFIER detail::tvec4 step ( - typename detail::tvec4::value_type const & edge, + typename detail::tvec4::T const & edge, detail::tvec4 const & x ) { @@ -947,14 +947,7 @@ namespace detail GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) { - union - { - float f; - int i; - } fi; - - fi.f = value; - return fi.i; + return *reinterpret_cast(const_cast(&value)); } GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt @@ -992,14 +985,7 @@ namespace detail GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) { - union - { - float f; - uint u; - } fu; - - fu.f = value; - return fu.u; + return *reinterpret_cast(const_cast(&value)); } GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint @@ -1037,14 +1023,7 @@ namespace detail GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) { - union - { - float f; - int i; - } fi; - - fi.i = value; - return fi.f; + return *reinterpret_cast(const_cast(&value)); } GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat @@ -1083,14 +1062,7 @@ namespace detail GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) { - union - { - float f; - uint u; - } fu; - - fu.u = value; - return fu.f; + return *reinterpret_cast(const_cast(&value)); } GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat diff --git a/glm/core/func_geometric.hpp b/glm/core/func_geometric.hpp index 2c44a9ee..a49e045c 100644 --- a/glm/core/func_geometric.hpp +++ b/glm/core/func_geometric.hpp @@ -128,7 +128,7 @@ namespace glm GLM_FUNC_DECL genType refract( genType const & I, genType const & N, - typename genType::value_type const & eta); + typename genType::T const & eta); /// @} }//namespace glm diff --git a/glm/core/func_geometric.inl b/glm/core/func_geometric.inl index 6133565b..1f8e0f7c 100644 --- a/glm/core/func_geometric.inl +++ b/glm/core/func_geometric.inl @@ -295,7 +295,7 @@ namespace glm ( genType const & I, genType const & N, - typename genType::value_type const & eta + typename genType::T const & eta ) { //It could be a vector diff --git a/glm/core/func_noise.inl b/glm/core/func_noise.inl index 3571d778..a05d431c 100644 --- a/glm/core/func_noise.inl +++ b/glm/core/func_noise.inl @@ -101,14 +101,14 @@ namespace glm // Gradients: 41 points uniformly over a line, mapped onto a diamond. // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 x = static_cast(2) * fract(p * C.w) - T(1); detail::tvec3 h = abs(x) - T(0.5); detail::tvec3 ox = floor(x + T(0.5)); detail::tvec3 a0 = x - ox; // Normalise gradients implicitly by scaling m // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); - m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + m *= static_cast(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); // Compute final noise value at P detail::tvec3 g; @@ -152,7 +152,7 @@ namespace glm // Gradients: 7x7 points over a square, mapped onto an octahedron. // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - T n_ = T(0.142857142857); // 1.0/7.0 + T n_ = static_cast(0.142857142857); // 1.0/7.0 detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) @@ -204,7 +204,7 @@ namespace glm -0.447213595499958); // -1 + 4 * G4 // (sqrt(5) - 1)/4 = F4, used once below - T const F4 = T(0.309016994374947451); + T const F4 = static_cast(0.309016994374947451); // First corner detail::tvec4 i = floor(v + dot(v, detail::tvec4(F4))); @@ -219,17 +219,17 @@ namespace glm // i0.x = dot(isX, vec3(1.0)); //i0.x = isX.x + isX.y + isX.z; - //i0.yzw = T(1) - isX; + //i0.yzw = static_cast(1) - isX; i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); // i0.y += dot(isYZ.xy, vec2(1.0)); i0.y += isYZ.x + isYZ.y; //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); - i0.z += T(1) - isYZ.x; - i0.w += T(1) - isYZ.y; + i0.z += static_cast(1) - isYZ.x; + i0.w += static_cast(1) - isYZ.y; i0.z += isYZ.z; - i0.w += T(1) - isYZ.z; + i0.w += static_cast(1) - isYZ.z; // i0 now contains the unique values 0,1,2,3 in each channel detail::tvec4 i3 = clamp(i0, T(0), T(1)); diff --git a/glm/core/func_packing.inl b/glm/core/func_packing.inl index 2ee447e1..44040bb1 100644 --- a/glm/core/func_packing.inl +++ b/glm/core/func_packing.inl @@ -45,17 +45,9 @@ namespace glm GLM_FUNC_QUALIFIER uint32 packSnorm2x16(vec2 const & v) { - union iu - { - int16 i; - uint16 u; - } A, B; - - vec2 Unpack = round(clamp(v ,-1.0f, 1.0f) * 32767.0f); - A.i = detail::int16(Unpack.x); - B.i = detail::int16(Unpack.y); - uint32 Pack = (uint32(B.u) << 16) | (uint32(A.u) << 0); - return Pack; + i16vec2 Unpack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); + u32vec2 Topack(*reinterpret_cast(&Unpack)); + return (Topack.x << 16) | (Topack.y << 0); } GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint32 const & p) diff --git a/glm/core/type_gentype.hpp b/glm/core/type_gentype.hpp index 9bfa7a94..6c9de95f 100644 --- a/glm/core/type_gentype.hpp +++ b/glm/core/type_gentype.hpp @@ -132,7 +132,7 @@ namespace detail base(); base(class_type const & m); - explicit base(value_type const & x); + explicit base(T const & x); explicit base(value_type const * const x); explicit base(col_type const * const x); @@ -149,13 +149,13 @@ namespace detail ////////////////////////////////////// // Unary updatable operators class_type& operator= (class_type const & x); - class_type& operator+= (value_type const & x); + class_type& operator+= (T const & x); class_type& operator+= (class_type const & x); - class_type& operator-= (value_type const & x); + class_type& operator-= (T const & x); class_type& operator-= (class_type const & x); - class_type& operator*= (value_type const & x); + class_type& operator*= (T const & x); class_type& operator*= (class_type const & x); - class_type& operator/= (value_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/core/type_gentype.inl b/glm/core/type_gentype.inl index 2ca7496f..c7f31983 100644 --- a/glm/core/type_gentype.inl +++ b/glm/core/type_gentype.inl @@ -97,7 +97,7 @@ base::base template base::base ( - typename base::value_type const & x + typename base::T const & x ) { if(rT == 1) // vector @@ -211,7 +211,7 @@ typename base::class_type& base::operator= template typename base::class_type& base::operator+= ( - typename base::value_type const & x + typename base::T const & x ) { typename base::size_type stop_col = x.col_size(); @@ -243,7 +243,7 @@ typename base::class_type& base::operator+= template typename base::class_type& base::operator-= ( - typename base::value_type const & x + typename base::T const & x ) { typename base::size_type stop_col = x.col_size(); @@ -275,7 +275,7 @@ typename base::class_type& base::operator-= template typename base::class_type& base::operator*= ( - typename base::value_type const & x + typename base::T const & x ) { typename base::size_type stop_col = x.col_size(); @@ -307,7 +307,7 @@ typename base::class_type& base::operator*= template typename base::class_type& base::operator/= ( - typename base::value_type const & x + typename base::T const & x ) { typename base::size_type stop_col = x.col_size(); diff --git a/glm/core/type_mat2x2.hpp b/glm/core/type_mat2x2.hpp index 38ec7214..f1be3e9e 100644 --- a/glm/core/type_mat2x2.hpp +++ b/glm/core/type_mat2x2.hpp @@ -72,10 +72,10 @@ namespace detail GLM_FUNC_DECL explicit tmat2x2( ctor Null); GLM_FUNC_DECL explicit tmat2x2( - value_type const & x); + T const & x); GLM_FUNC_DECL explicit tmat2x2( - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2); + T const & x1, T const & y1, + T const & x2, T const & y2); GLM_FUNC_DECL explicit tmat2x2( col_type const & v1, col_type const & v2); @@ -151,11 +151,11 @@ namespace detail template GLM_FUNC_DECL tmat2x2 operator+ ( tmat2x2 const & m, - typename tmat2x2::value_type const & s); + typename tmat2x2::T const & s); template GLM_FUNC_DECL tmat2x2 operator+ ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m); template @@ -166,11 +166,11 @@ namespace detail template GLM_FUNC_DECL tmat2x2 operator- ( tmat2x2 const & m, - typename tmat2x2::value_type const & s); + typename tmat2x2::T const & s); template GLM_FUNC_DECL tmat2x2 operator- ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m); template @@ -181,11 +181,11 @@ namespace detail template GLM_FUNC_DECL tmat2x2 operator* ( tmat2x2 const & m, - typename tmat2x2::value_type const & s); + typename tmat2x2::T const & s); template GLM_FUNC_DECL tmat2x2 operator* ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m); template @@ -216,11 +216,11 @@ namespace detail template GLM_FUNC_DECL tmat2x2 operator/ ( tmat2x2 const & m, - typename tmat2x2::value_type const & s); + typename tmat2x2::T const & s); template GLM_FUNC_DECL tmat2x2 operator/ ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m); template diff --git a/glm/core/type_mat2x2.inl b/glm/core/type_mat2x2.inl index 2271ff7e..adc34f09 100644 --- a/glm/core/type_mat2x2.inl +++ b/glm/core/type_mat2x2.inl @@ -111,7 +111,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -122,8 +122,8 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1 + T const & x0, T const & y0, + T const & x1, T const & y1 ) { this->value[0] = col_type(x0, y0); @@ -151,7 +151,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); + this->value[0] = tvec2(static_cast(s), Zero); this->value[1] = tvec2(Zero, value_type(s)); } @@ -163,8 +163,8 @@ namespace detail X2 const & x2, Y2 const & y2 ) { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); + this->value[0] = col_type(static_cast(x1), value_type(y1)); + this->value[1] = col_type(static_cast(x2), value_type(y2)); } template @@ -444,7 +444,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x2 operator+ ( tmat2x2 const & m, - typename tmat2x2::value_type const & s + typename tmat2x2::T const & s ) { return tmat2x2( @@ -455,7 +455,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2 operator+ ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m ) { @@ -480,7 +480,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x2 operator- ( tmat2x2 const & m, - typename tmat2x2::value_type const & s + typename tmat2x2::T const & s ) { return tmat2x2( @@ -491,7 +491,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2 operator- ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m ) { @@ -516,7 +516,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x2 operator* ( tmat2x2 const & m, - typename tmat2x2::value_type const & s + typename tmat2x2::T const & s ) { return tmat2x2( @@ -527,7 +527,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2 operator* ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m ) { @@ -612,7 +612,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x2 operator/ ( tmat2x2 const & m, - typename tmat2x2::value_type const & s + typename tmat2x2::T const & s ) { return tmat2x2( @@ -623,7 +623,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x2 operator/ ( - typename tmat2x2::value_type const & s, + typename tmat2x2::T const & s, tmat2x2 const & m ) { diff --git a/glm/core/type_mat2x3.hpp b/glm/core/type_mat2x3.hpp index f1d8f9cb..434f3777 100644 --- a/glm/core/type_mat2x3.hpp +++ b/glm/core/type_mat2x3.hpp @@ -65,10 +65,10 @@ namespace detail GLM_FUNC_DECL explicit tmat2x3( ctor); GLM_FUNC_DECL explicit tmat2x3( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tmat2x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1); + T const & x0, T const & y0, T const & z0, + T const & x1, T const & y1, T const & z1); GLM_FUNC_DECL explicit tmat2x3( col_type const & v0, col_type const & v1); @@ -140,7 +140,7 @@ namespace detail template GLM_FUNC_DECL tmat2x3 operator+ ( tmat2x3 const & m, - typename tmat2x3::value_type const & s); + typename tmat2x3::T const & s); template tmat2x3 operator+ ( @@ -150,7 +150,7 @@ namespace detail template GLM_FUNC_DECL tmat2x3 operator- ( tmat2x3 const & m, - typename tmat2x3::value_type const & s); + typename tmat2x3::T const & s); template GLM_FUNC_DECL tmat2x3 operator- ( @@ -160,11 +160,11 @@ namespace detail template GLM_FUNC_DECL tmat2x3 operator* ( tmat2x3 const & m, - typename tmat2x3::value_type const & s); + typename tmat2x3::T const & s); template GLM_FUNC_DECL tmat2x3 operator* ( - typename tmat2x3::value_type const & s, + typename tmat2x3::T const & s, tmat2x3 const & m); template @@ -195,11 +195,11 @@ namespace detail template GLM_FUNC_DECL tmat2x3 operator/ ( tmat2x3 const & m, - typename tmat2x3::value_type const & s); + typename tmat2x3::T const & s); template GLM_FUNC_DECL tmat2x3 operator/ ( - typename tmat2x3::value_type const & s, + typename tmat2x3::T const & s, tmat2x3 const & m); // Unary constant operators diff --git a/glm/core/type_mat2x3.inl b/glm/core/type_mat2x3.inl index c0343dae..454099e7 100644 --- a/glm/core/type_mat2x3.inl +++ b/glm/core/type_mat2x3.inl @@ -111,7 +111,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 ( - value_type const & s + T const & s ) { this->value[0] = col_type(s, T(0), T(0)); @@ -121,8 +121,8 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1 + T const & x0, T const & y0, T const & z0, + T const & x1, T const & y1, T const & z1 ) { this->value[0] = col_type(x0, y0, z0); @@ -150,7 +150,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[0] = tvec3(static_cast(s), Zero, Zero); this->value[1] = tvec3(Zero, value_type(s), Zero); } @@ -164,8 +164,8 @@ namespace detail X2 const & x2, Y2 const & y2, Z2 const & z2 ) { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2)); } template @@ -421,7 +421,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x3 operator+ ( tmat2x3 const & m, - typename tmat2x3::value_type const & s + typename tmat2x3::T const & s ) { return tmat2x3( @@ -445,7 +445,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x3 operator- ( tmat2x3 const & m, - typename tmat2x3::value_type const & s + typename tmat2x3::T const & s ) { return tmat2x3( @@ -469,7 +469,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x3 operator* ( tmat2x3 const & m, - typename tmat2x3::value_type const & s + typename tmat2x3::T const & s ) { return tmat2x3( @@ -480,7 +480,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x3 operator* ( - typename tmat2x3::value_type const & s, + typename tmat2x3::T const & s, tmat2x3 const & m ) { @@ -588,7 +588,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x3 operator/ ( tmat2x3 const & m, - typename tmat2x3::value_type const & s + typename tmat2x3::T const & s ) { return tmat2x3( @@ -599,7 +599,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x3 operator/ ( - typename tmat2x3::value_type const & s, + typename tmat2x3::T const & s, tmat2x3 const & m ) { diff --git a/glm/core/type_mat2x4.hpp b/glm/core/type_mat2x4.hpp index 30d48b9b..18be6808 100644 --- a/glm/core/type_mat2x4.hpp +++ b/glm/core/type_mat2x4.hpp @@ -65,10 +65,10 @@ namespace detail GLM_FUNC_DECL explicit tmat2x4( ctor); GLM_FUNC_DECL explicit tmat2x4( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tmat2x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); + T const & x0, T const & y0, T const & z0, T const & w0, + T const & x1, T const & y1, T const & z1, T const & w1); GLM_FUNC_DECL explicit tmat2x4( col_type const & v0, col_type const & v1); @@ -142,7 +142,7 @@ namespace detail template GLM_FUNC_DECL tmat2x4 operator+ ( tmat2x4 const & m, - typename tmat2x4::value_type const & s); + typename tmat2x4::T const & s); template GLM_FUNC_DECL tmat2x4 operator+ ( @@ -152,7 +152,7 @@ namespace detail template GLM_FUNC_DECL tmat2x4 operator- ( tmat2x4 const & m, - typename tmat2x4::value_type const & s); + typename tmat2x4::T const & s); template GLM_FUNC_DECL tmat2x4 operator- ( @@ -162,11 +162,11 @@ namespace detail template GLM_FUNC_DECL tmat2x4 operator* ( tmat2x4 const & m, - typename tmat2x4::value_type const & s); + typename tmat2x4::T const & s); template GLM_FUNC_DECL tmat2x4 operator* ( - typename tmat2x4::value_type const & s, + typename tmat2x4::T const & s, tmat2x4 const & m); template @@ -197,11 +197,11 @@ namespace detail template GLM_FUNC_DECL tmat2x4 operator/ ( tmat2x4 const & m, - typename tmat2x4::value_type const & s); + typename tmat2x4::T const & s); template GLM_FUNC_DECL tmat2x4 operator/ ( - typename tmat2x4::value_type const & s, + typename tmat2x4::T const & s, tmat2x4 const & m); // Unary constant operators diff --git a/glm/core/type_mat2x4.inl b/glm/core/type_mat2x4.inl index f0cd3ad1..b94be0a2 100644 --- a/glm/core/type_mat2x4.inl +++ b/glm/core/type_mat2x4.inl @@ -113,7 +113,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -124,8 +124,8 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1 + T const & x0, T const & y0, T const & z0, T const & w0, + T const & x1, T const & y1, T const & z1, T const & w1 ) { this->value[0] = col_type(x0, y0, z0, w0); @@ -153,7 +153,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[0] = tvec4(static_cast(s), Zero, Zero, Zero); this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); } @@ -167,8 +167,8 @@ namespace detail X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 ) { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2), value_type(w2)); } template @@ -424,7 +424,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x4 operator+ ( tmat2x4 const & m, - typename tmat2x4::value_type const & s + typename tmat2x4::T const & s ) { return tmat2x4( @@ -448,7 +448,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x4 operator- ( tmat2x4 const & m, - typename tmat2x4::value_type const & s + typename tmat2x4::T const & s ) { return tmat2x4( @@ -472,7 +472,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x4 operator* ( tmat2x4 const & m, - typename tmat2x4::value_type const & s + typename tmat2x4::T const & s ) { return tmat2x4( @@ -483,7 +483,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x4 operator* ( - typename tmat2x4::value_type const & s, + typename tmat2x4::T const & s, tmat2x4 const & m ) { @@ -607,7 +607,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat2x4 operator/ ( tmat2x4 const & m, - typename tmat2x4::value_type const & s + typename tmat2x4::T const & s ) { return tmat2x4( @@ -618,7 +618,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat2x4 operator/ ( - typename tmat2x4::value_type const & s, + typename tmat2x4::T const & s, tmat2x4 const & m ) { diff --git a/glm/core/type_mat3x2.hpp b/glm/core/type_mat3x2.hpp index afbf9f03..239d62a8 100644 --- a/glm/core/type_mat3x2.hpp +++ b/glm/core/type_mat3x2.hpp @@ -65,11 +65,11 @@ namespace detail GLM_FUNC_DECL explicit tmat3x2( ctor); GLM_FUNC_DECL explicit tmat3x2( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tmat3x2( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2); + T const & x0, T const & y0, + T const & x1, T const & y1, + T const & x2, T const & y2); GLM_FUNC_DECL explicit tmat3x2( col_type const & v0, col_type const & v1, @@ -145,7 +145,7 @@ namespace detail template GLM_FUNC_DECL tmat3x2 operator+ ( tmat3x2 const & m, - typename tmat3x2::value_type const & s); + typename tmat3x2::T const & s); template GLM_FUNC_DECL tmat3x2 operator+ ( @@ -155,7 +155,7 @@ namespace detail template GLM_FUNC_DECL tmat3x2 operator- ( tmat3x2 const & m, - typename tmat3x2::value_type const & s); + typename tmat3x2::T const & s); template GLM_FUNC_DECL tmat3x2 operator- ( @@ -165,11 +165,11 @@ namespace detail template GLM_FUNC_DECL tmat3x2 operator* ( tmat3x2 const & m, - typename tmat3x2::value_type const & s); + typename tmat3x2::T const & s); template GLM_FUNC_DECL tmat3x2 operator* ( - typename tmat3x2::value_type const & s, + typename tmat3x2::T const & s, tmat3x2 const & m); template @@ -200,11 +200,11 @@ namespace detail template GLM_FUNC_DECL tmat3x2 operator/ ( tmat3x2 const & m, - typename tmat3x2::value_type const & s); + typename tmat3x2::T const & s); template GLM_FUNC_DECL tmat3x2 operator/ ( - typename tmat3x2::value_type const & s, + typename tmat3x2::T const & s, tmat3x2 const & m); // Unary constant operators diff --git a/glm/core/type_mat3x2.inl b/glm/core/type_mat3x2.inl index 624f7587..d0ddd6ec 100644 --- a/glm/core/type_mat3x2.inl +++ b/glm/core/type_mat3x2.inl @@ -114,7 +114,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( - value_type const & s + T const & s ) { this->value[0] = col_type(s, 0); @@ -125,9 +125,9 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2 + T const & x0, T const & y0, + T const & x1, T const & y1, + T const & x2, T const & y2 ) { this->value[0] = col_type(x0, y0); @@ -158,7 +158,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); + this->value[0] = tvec2(static_cast(s), Zero); this->value[1] = tvec2(Zero, value_type(s)); this->value[2] = tvec2(Zero); } @@ -175,9 +175,9 @@ namespace detail X3 const & x3, Y3 const & y3 ) { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); - this->value[2] = col_type(value_type(x3), value_type(y3)); + this->value[0] = col_type(static_cast(x1), value_type(y1)); + this->value[1] = col_type(static_cast(x2), value_type(y2)); + this->value[2] = col_type(static_cast(x3), value_type(y3)); } template @@ -454,7 +454,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x2 operator+ ( tmat3x2 const & m, - typename tmat3x2::value_type const & s + typename tmat3x2::T const & s ) { return tmat3x2( @@ -480,7 +480,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x2 operator- ( tmat3x2 const & m, - typename tmat3x2::value_type const & s + typename tmat3x2::T const & s ) { return tmat3x2( @@ -506,7 +506,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x2 operator* ( tmat3x2 const & m, - typename tmat3x2::value_type const & s + typename tmat3x2::T const & s ) { return tmat3x2( @@ -518,7 +518,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x2 operator* ( - typename tmat3x2::value_type const & s, + typename tmat3x2::T const & s, tmat3x2 const & m ) { @@ -618,7 +618,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x2 operator/ ( tmat3x2 const & m, - typename tmat3x2::value_type const & s + typename tmat3x2::T const & s ) { return tmat3x2( @@ -630,7 +630,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x2 operator/ ( - typename tmat3x2::value_type const & s, + typename tmat3x2::T const & s, tmat3x2 const & m ) { diff --git a/glm/core/type_mat3x3.hpp b/glm/core/type_mat3x3.hpp index 4fa8bff4..7843d660 100644 --- a/glm/core/type_mat3x3.hpp +++ b/glm/core/type_mat3x3.hpp @@ -71,11 +71,11 @@ namespace detail GLM_FUNC_DECL explicit tmat3x3( ctor Null); GLM_FUNC_DECL explicit tmat3x3( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tmat3x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2); + 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); GLM_FUNC_DECL explicit tmat3x3( col_type const & v0, col_type const & v1, @@ -153,11 +153,11 @@ namespace detail template GLM_FUNC_DECL tmat3x3 operator+ ( tmat3x3 const & m, - typename tmat3x3::value_type const & s); + typename tmat3x3::T const & s); template GLM_FUNC_DECL tmat3x3 operator+ ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m); template @@ -168,11 +168,11 @@ namespace detail template GLM_FUNC_DECL tmat3x3 operator- ( tmat3x3 const & m, - typename tmat3x3::value_type const & s); + typename tmat3x3::T const & s); template GLM_FUNC_DECL tmat3x3 operator- ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m); template @@ -183,11 +183,11 @@ namespace detail template GLM_FUNC_DECL tmat3x3 operator* ( tmat3x3 const & m, - typename tmat3x3::value_type const & s); + typename tmat3x3::T const & s); template GLM_FUNC_DECL tmat3x3 operator* ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m); template @@ -218,11 +218,11 @@ namespace detail template GLM_FUNC_DECL tmat3x3 operator/ ( tmat3x3 const & m, - typename tmat3x3::value_type const & s); + typename tmat3x3::T const & s); template GLM_FUNC_DECL tmat3x3 operator/ ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m); template diff --git a/glm/core/type_mat3x3.inl b/glm/core/type_mat3x3.inl index c9ef9dc0..1e7b389d 100644 --- a/glm/core/type_mat3x3.inl +++ b/glm/core/type_mat3x3.inl @@ -116,7 +116,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -128,9 +128,9 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2 + 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 ) { this->value[0] = col_type(x0, y0, z0); @@ -161,7 +161,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[0] = tvec3(static_cast(s), Zero, Zero); this->value[1] = tvec3(Zero, value_type(s), Zero); this->value[2] = tvec3(Zero, Zero, value_type(s)); } @@ -178,9 +178,9 @@ namespace detail X3 const & x3, Y3 const & y3, Z3 const & z3 ) { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(static_cast(x3), value_type(y3), value_type(z3)); } template @@ -512,7 +512,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x3 operator+ ( tmat3x3 const & m, - typename tmat3x3::value_type const & s + typename tmat3x3::T const & s ) { return tmat3x3( @@ -524,7 +524,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3 operator+ ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m ) { @@ -551,7 +551,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x3 operator- ( tmat3x3 const & m, - typename tmat3x3::value_type const & s + typename tmat3x3::T const & s ) { return tmat3x3( @@ -563,7 +563,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3 operator- ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m ) { @@ -590,7 +590,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x3 operator* ( tmat3x3 const & m, - typename tmat3x3::value_type const & s + typename tmat3x3::T const & s ) { return tmat3x3( @@ -602,7 +602,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3 operator* ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m ) { @@ -720,7 +720,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x3 operator/ ( tmat3x3 const & m, - typename tmat3x3::value_type const & s + typename tmat3x3::T const & s ) { return tmat3x3( @@ -732,7 +732,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x3 operator/ ( - typename tmat3x3::value_type const & s, + typename tmat3x3::T const & s, tmat3x3 const & m ) { diff --git a/glm/core/type_mat3x4.hpp b/glm/core/type_mat3x4.hpp index 2d72d2fb..6ecb8636 100644 --- a/glm/core/type_mat3x4.hpp +++ b/glm/core/type_mat3x4.hpp @@ -65,11 +65,11 @@ namespace detail GLM_FUNC_DECL explicit tmat3x4( ctor Null); GLM_FUNC_DECL explicit tmat3x4( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tmat3x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); + 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); GLM_FUNC_DECL explicit tmat3x4( col_type const & v0, col_type const & v1, @@ -145,7 +145,7 @@ namespace detail template GLM_FUNC_DECL tmat3x4 operator+ ( tmat3x4 const & m, - typename tmat3x4::value_type const & s); + typename tmat3x4::T const & s); template GLM_FUNC_DECL tmat3x4 operator+ ( @@ -155,7 +155,7 @@ namespace detail template GLM_FUNC_DECL tmat3x4 operator- ( tmat3x4 const & m, - typename tmat3x4::value_type const & s); + typename tmat3x4::T const & s); template GLM_FUNC_DECL tmat3x4 operator- ( @@ -165,11 +165,11 @@ namespace detail template GLM_FUNC_DECL tmat3x4 operator* ( tmat3x4 const & m, - typename tmat3x4::value_type const & s); + typename tmat3x4::T const & s); template GLM_FUNC_DECL tmat3x4 operator* ( - typename tmat3x4::value_type const & s, + typename tmat3x4::T const & s, tmat3x4 const & m); template @@ -200,11 +200,11 @@ namespace detail template GLM_FUNC_DECL tmat3x4 operator/ ( tmat3x4 const & m, - typename tmat3x4::value_type const & s); + typename tmat3x4::T const & s); template GLM_FUNC_DECL tmat3x4 operator/ ( - typename tmat3x4::value_type const & s, + typename tmat3x4::T const & s, tmat3x4 const & m); // Unary constant operators diff --git a/glm/core/type_mat3x4.inl b/glm/core/type_mat3x4.inl index e014da41..a8a10dec 100644 --- a/glm/core/type_mat3x4.inl +++ b/glm/core/type_mat3x4.inl @@ -114,7 +114,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -126,9 +126,9 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2 + 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 ) { this->value[0] = col_type(x0, y0, z0, w0); @@ -159,7 +159,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[0] = tvec4(static_cast(s), Zero, Zero, Zero); this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); } @@ -176,9 +176,9 @@ namespace detail X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3 ) { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(static_cast(x3), value_type(y3), value_type(z3), value_type(w3)); } template @@ -453,7 +453,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x4 operator+ ( tmat3x4 const & m, - typename tmat3x4::value_type const & s + typename tmat3x4::T const & s ) { return tmat3x4( @@ -479,7 +479,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x4 operator- ( tmat3x4 const & m, - typename tmat3x4::value_type const & s + typename tmat3x4::T const & s ) { return tmat3x4( @@ -505,7 +505,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x4 operator* ( tmat3x4 const & m, - typename tmat3x4::value_type const & s + typename tmat3x4::T const & s ) { return tmat3x4( @@ -517,7 +517,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x4 operator* ( - typename tmat3x4::value_type const & s, + typename tmat3x4::T const & s, tmat3x4 const & m ) { @@ -651,7 +651,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat3x4 operator/ ( tmat3x4 const & m, - typename tmat3x4::value_type const & s + typename tmat3x4::T const & s ) { return tmat3x4( @@ -663,7 +663,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat3x4 operator/ ( - typename tmat3x4::value_type const & s, + typename tmat3x4::T const & s, tmat3x4 const & m ) { diff --git a/glm/core/type_mat4x2.hpp b/glm/core/type_mat4x2.hpp index 80ba7da8..8e928a49 100644 --- a/glm/core/type_mat4x2.hpp +++ b/glm/core/type_mat4x2.hpp @@ -65,12 +65,12 @@ namespace detail GLM_FUNC_DECL explicit tmat4x2( ctor Null); GLM_FUNC_DECL explicit tmat4x2( - value_type const & x); + T const & x); GLM_FUNC_DECL explicit tmat4x2( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2, - value_type const & x3, value_type const & y3); + T const & x0, T const & y0, + T const & x1, T const & y1, + T const & x2, T const & y2, + T const & x3, T const & y3); GLM_FUNC_DECL explicit tmat4x2( col_type const & v0, col_type const & v1, @@ -150,7 +150,7 @@ namespace detail template GLM_FUNC_DECL tmat4x2 operator+ ( tmat4x2 const & m, - typename tmat4x2::value_type const & s); + typename tmat4x2::T const & s); template GLM_FUNC_DECL tmat4x2 operator+ ( @@ -160,7 +160,7 @@ namespace detail template GLM_FUNC_DECL tmat4x2 operator- ( tmat4x2 const & m, - typename tmat4x2::value_type const & s); + typename tmat4x2::T const & s); template GLM_FUNC_DECL tmat4x2 operator- ( @@ -170,11 +170,11 @@ namespace detail template GLM_FUNC_DECL tmat4x2 operator* ( tmat4x2 const & m, - typename tmat4x2::value_type const & s); + typename tmat4x2::T const & s); template GLM_FUNC_DECL tmat4x2 operator* ( - typename tmat4x2::value_type const & s, + typename tmat4x2::T const & s, tmat4x2 const & m); template @@ -205,11 +205,11 @@ namespace detail template GLM_FUNC_DECL tmat4x2 operator/ ( tmat4x2 const & m, - typename tmat4x2::value_type const & s); + typename tmat4x2::T const & s); template GLM_FUNC_DECL tmat4x2 operator/ ( - typename tmat4x2::value_type const & s, + typename tmat4x2::T const & s, tmat4x2 const & m); // Unary constant operators diff --git a/glm/core/type_mat4x2.inl b/glm/core/type_mat4x2.inl index 0a64b922..5f9d2b73 100644 --- a/glm/core/type_mat4x2.inl +++ b/glm/core/type_mat4x2.inl @@ -114,7 +114,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -127,10 +127,10 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2, - value_type const & x3, value_type const & y3 + T const & x0, T const & y0, + T const & x1, T const & y1, + T const & x2, T const & y2, + T const & x3, T const & y3 ) { this->value[0] = col_type(x0, y0); @@ -164,7 +164,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); + this->value[0] = tvec2(static_cast(s), Zero); this->value[1] = tvec2(Zero, value_type(s)); this->value[2] = tvec2(Zero, Zero); this->value[3] = tvec2(Zero, Zero); @@ -184,10 +184,10 @@ namespace detail X4 const & x4, Y4 const & y4 ) { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); - this->value[2] = col_type(value_type(x3), value_type(y3)); - this->value[3] = col_type(value_type(x4), value_type(y4)); + this->value[0] = col_type(static_cast(x1), value_type(y1)); + this->value[1] = col_type(static_cast(x2), value_type(y2)); + this->value[2] = col_type(static_cast(x3), value_type(y3)); + this->value[3] = col_type(static_cast(x4), value_type(y4)); } template @@ -228,8 +228,8 @@ namespace detail { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); + this->value[2] = col_type(static_cast(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -241,7 +241,7 @@ namespace detail this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -264,8 +264,8 @@ namespace detail { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); + this->value[2] = col_type(static_cast(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -277,7 +277,7 @@ namespace detail this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -288,8 +288,8 @@ namespace detail { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); + this->value[2] = col_type(static_cast(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -313,7 +313,7 @@ namespace detail this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } ////////////////////////////////////////////////////////////// @@ -483,7 +483,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x2 operator+ ( tmat4x2 const & m, - typename tmat4x2::value_type const & s + typename tmat4x2::T const & s ) { return tmat4x2( @@ -511,7 +511,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x2 operator- ( tmat4x2 const & m, - typename tmat4x2::value_type const & s + typename tmat4x2::T const & s ) { return tmat4x2( @@ -539,7 +539,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x2 operator* ( tmat4x2 const & m, - typename tmat4x2::value_type const & s + typename tmat4x2::T const & s ) { return tmat4x2( @@ -552,7 +552,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x2 operator* ( - typename tmat4x2::value_type const & s, + typename tmat4x2::T const & s, tmat4x2 const & m ) { @@ -660,7 +660,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x2 operator/ ( tmat4x2 const & m, - typename tmat4x2::value_type const & s + typename tmat4x2::T const & s ) { return tmat4x2( @@ -673,7 +673,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x2 operator/ ( - typename tmat4x2::value_type const & s, + typename tmat4x2::T const & s, tmat4x2 const & m ) { diff --git a/glm/core/type_mat4x3.hpp b/glm/core/type_mat4x3.hpp index 795cbec7..95b58201 100644 --- a/glm/core/type_mat4x3.hpp +++ b/glm/core/type_mat4x3.hpp @@ -65,12 +65,12 @@ namespace detail GLM_FUNC_DECL explicit tmat4x3( ctor Null); GLM_FUNC_DECL explicit tmat4x3( - value_type const & x); + T const & x); GLM_FUNC_DECL explicit tmat4x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2, - value_type const & x3, value_type const & y3, value_type 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 explicit tmat4x3( col_type const & v0, col_type const & v1, @@ -150,7 +150,7 @@ namespace detail template GLM_FUNC_DECL tmat4x3 operator+ ( tmat4x3 const & m, - typename tmat4x3::value_type const & s); + typename tmat4x3::T const & s); template GLM_FUNC_DECL tmat4x3 operator+ ( @@ -160,7 +160,7 @@ namespace detail template GLM_FUNC_DECL tmat4x3 operator- ( tmat4x3 const & m, - typename tmat4x3::value_type const & s); + typename tmat4x3::T const & s); template GLM_FUNC_DECL tmat4x3 operator- ( @@ -170,11 +170,11 @@ namespace detail template GLM_FUNC_DECL tmat4x3 operator* ( tmat4x3 const & m, - typename tmat4x3::value_type const & s); + typename tmat4x3::T const & s); template GLM_FUNC_DECL tmat4x3 operator* ( - typename tmat4x3::value_type const & s, + typename tmat4x3::T const & s, tmat4x3 const & m); template @@ -205,11 +205,11 @@ namespace detail template GLM_FUNC_DECL tmat4x3 operator/ ( tmat4x3 const & m, - typename tmat4x3::value_type const & s); + typename tmat4x3::T const & s); template GLM_FUNC_DECL tmat4x3 operator/ ( - typename tmat4x3::value_type const & s, + typename tmat4x3::T const & s, tmat4x3 const & m); // Unary constant operators diff --git a/glm/core/type_mat4x3.inl b/glm/core/type_mat4x3.inl index 5f8b6757..997cd200 100644 --- a/glm/core/type_mat4x3.inl +++ b/glm/core/type_mat4x3.inl @@ -113,7 +113,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3( - value_type const & s) + T const & s) { value_type const Zero(0); this->value[0] = col_type(s, Zero, Zero); @@ -125,10 +125,10 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2, - value_type const & x3, value_type const & y3, value_type 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); @@ -162,7 +162,7 @@ namespace detail ) { value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[0] = tvec3(static_cast(s), Zero, Zero); this->value[1] = tvec3(Zero, value_type(s), Zero); this->value[2] = tvec3(Zero, Zero, value_type(s)); this->value[3] = tvec3(Zero, Zero, Zero); @@ -182,10 +182,10 @@ namespace detail X4 const & x4, Y4 const & y4, Z4 const & z4 ) { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); - this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(static_cast(x3), value_type(y3), value_type(z3)); + this->value[3] = col_type(static_cast(x4), value_type(y4), value_type(z4)); } template @@ -229,7 +229,7 @@ namespace detail this->value[0] = col_type(m[0], value_type(0)); this->value[1] = col_type(m[1], value_type(0)); this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -241,7 +241,7 @@ namespace detail this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -264,8 +264,8 @@ namespace detail { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); - this->value[3] = col_type(value_type(0)); + this->value[2] = col_type(static_cast(0), value_type(0), value_type(1)); + this->value[3] = col_type(static_cast(0)); } template @@ -277,7 +277,7 @@ namespace detail this->value[0] = col_type(m[0], value_type(0)); this->value[1] = col_type(m[1], value_type(0)); this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } template @@ -288,8 +288,8 @@ namespace detail { this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); - this->value[3] = col_type(value_type(0)); + this->value[2] = col_type(static_cast(0), value_type(0), value_type(1)); + this->value[3] = col_type(static_cast(0)); } template @@ -313,7 +313,7 @@ namespace detail this->value[0] = col_type(m[0]); this->value[1] = col_type(m[1]); this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); + this->value[3] = col_type(static_cast(0)); } ////////////////////////////////////////////////////////////// @@ -466,7 +466,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3 operator+ ( tmat4x3 const & m, - typename tmat4x3::value_type const & s) + typename tmat4x3::T const & s) { return tmat4x3( m[0] + s, @@ -490,7 +490,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3 operator- ( tmat4x3 const & m, - typename tmat4x3::value_type const & s) + typename tmat4x3::T const & s) { return tmat4x3( m[0] - s, @@ -514,7 +514,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3 operator* ( tmat4x3 const & m, - typename tmat4x3::value_type const & s) + typename tmat4x3::T const & s) { return tmat4x3( m[0] * s, @@ -525,7 +525,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3 operator* ( - typename tmat4x3::value_type const & s, + typename tmat4x3::T const & s, tmat4x3 const & m) { return tmat4x3( @@ -648,7 +648,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x3 operator/ ( tmat4x3 const & m, - typename tmat4x3::value_type const & s + typename tmat4x3::T const & s ) { return tmat4x3( @@ -661,7 +661,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x3 operator/ ( - typename tmat4x3::value_type const & s, + typename tmat4x3::T const & s, tmat4x3 const & m ) { diff --git a/glm/core/type_mat4x4.hpp b/glm/core/type_mat4x4.hpp index 39ce60d7..e1f53add 100644 --- a/glm/core/type_mat4x4.hpp +++ b/glm/core/type_mat4x4.hpp @@ -71,12 +71,12 @@ namespace detail GLM_FUNC_DECL explicit tmat4x4( ctor Null); GLM_FUNC_DECL explicit tmat4x4( - value_type const & x); + T const & x); GLM_FUNC_DECL explicit tmat4x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, - value_type const & x3, value_type const & y3, value_type const & z3, value_type 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 explicit tmat4x4( col_type const & v0, col_type const & v1, @@ -158,11 +158,11 @@ namespace detail template GLM_FUNC_DECL tmat4x4 operator+ ( tmat4x4 const & m, - typename tmat4x4::value_type const & s); + typename tmat4x4::T const & s); template GLM_FUNC_DECL tmat4x4 operator+ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m); template @@ -173,11 +173,11 @@ namespace detail template GLM_FUNC_DECL tmat4x4 operator- ( tmat4x4 const & m, - typename tmat4x4::value_type const & s); + typename tmat4x4::T const & s); template GLM_FUNC_DECL tmat4x4 operator- ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m); template @@ -188,11 +188,11 @@ namespace detail template GLM_FUNC_DECL tmat4x4 operator* ( tmat4x4 const & m, - typename tmat4x4::value_type const & s); + typename tmat4x4::T const & s); template GLM_FUNC_DECL tmat4x4 operator* ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m); template @@ -223,11 +223,11 @@ namespace detail template GLM_FUNC_DECL tmat4x4 operator/ ( tmat4x4 const & m, - typename tmat4x4::value_type const & s); + typename tmat4x4::T const & s); template GLM_FUNC_DECL tmat4x4 operator/ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m); template diff --git a/glm/core/type_mat4x4.inl b/glm/core/type_mat4x4.inl index e93583cc..a6fad1eb 100644 --- a/glm/core/type_mat4x4.inl +++ b/glm/core/type_mat4x4.inl @@ -121,7 +121,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 ( - value_type const & s + T const & s ) { value_type const Zero(0); @@ -134,10 +134,10 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, - value_type const & x3, value_type const & y3, value_type const & z3, value_type 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); @@ -186,7 +186,7 @@ namespace detail GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types"); value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[0] = tvec4(static_cast(s), Zero, Zero, Zero); this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); this->value[3] = tvec4(Zero, Zero, Zero, value_type(s)); @@ -226,10 +226,10 @@ namespace detail GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); - this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4)); + this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(static_cast(x3), value_type(y3), value_type(z3), value_type(w3)); + this->value[3] = col_type(static_cast(x4), value_type(y4), value_type(z4), value_type(w4)); } template @@ -263,8 +263,8 @@ namespace detail { this->value[0] = col_type(m[0], detail::tvec2(0)); this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + this->value[2] = col_type(static_cast(0)); + this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); } template @@ -276,7 +276,7 @@ namespace detail this->value[0] = col_type(m[0], value_type(0)); this->value[1] = col_type(m[1], value_type(0)); this->value[2] = col_type(m[2], value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); } template @@ -287,8 +287,8 @@ namespace detail { this->value[0] = col_type(m[0], value_type(0)); this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + this->value[2] = col_type(static_cast(0)); + this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); } template @@ -300,7 +300,7 @@ namespace detail this->value[0] = col_type(m[0], detail::tvec2(0)); this->value[1] = col_type(m[1], detail::tvec2(0)); this->value[2] = col_type(m[2], detail::tvec2(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(static_cast(0), value_type(0), value_type(0), value_type(1)); } template @@ -591,7 +591,7 @@ namespace detail - this->value[0][0] * SubFactor14 + this->value[0][1] * SubFactor16 - this->value[0][3] * SubFactor18, + this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18); - T Determinant = T( + T Determinant = static_cast( + this->value[0][0] * Inverse[0][0] + this->value[0][1] * Inverse[1][0] + this->value[0][2] * Inverse[2][0] @@ -606,7 +606,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x4 operator+ ( tmat4x4 const & m, - typename tmat4x4::value_type const & s + typename tmat4x4::T const & s ) { return tmat4x4( @@ -619,7 +619,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4 operator+ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m ) { @@ -648,7 +648,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x4 operator- ( tmat4x4 const & m, - typename tmat4x4::value_type const & s + typename tmat4x4::T const & s ) { return tmat4x4( @@ -661,7 +661,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4 operator- ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m ) { @@ -703,7 +703,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4 operator* ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m ) { @@ -845,7 +845,7 @@ namespace detail GLM_FUNC_QUALIFIER tmat4x4 operator/ ( tmat4x4 const & m, - typename tmat4x4::value_type const & s + typename tmat4x4::T const & s ) { return tmat4x4( @@ -858,7 +858,7 @@ namespace detail template GLM_FUNC_QUALIFIER tmat4x4 operator/ ( - typename tmat4x4::value_type const & s, + typename tmat4x4::T const & s, tmat4x4 const & m ) { diff --git a/glm/core/type_vec1.hpp b/glm/core/type_vec1.hpp index 3bba2fa7..a3dabf04 100644 --- a/glm/core/type_vec1.hpp +++ b/glm/core/type_vec1.hpp @@ -61,7 +61,7 @@ namespace detail // Accesses GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; + GLM_FUNC_DECL T const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors @@ -77,7 +77,7 @@ namespace detail GLM_FUNC_DECL explicit tvec1( ctor); GLM_FUNC_DECL explicit tvec1( - value_type const & s); + T const & s); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/core/type_vec1.inl b/glm/core/type_vec1.inl index 9acb879d..09a6a1d5 100644 --- a/glm/core/type_vec1.inl +++ b/glm/core/type_vec1.inl @@ -49,7 +49,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER typename tvec1::value_type const & tvec1::operator[] + GLM_FUNC_QUALIFIER typename tvec1::T const & tvec1::operator[] ( size_type i ) const @@ -63,7 +63,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1::tvec1() : - x(value_type(0)) + x(static_cast(0)) {} template @@ -96,7 +96,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1::tvec1 ( - value_type const & s + T const & s ) : x(s) {} @@ -121,7 +121,7 @@ namespace detail ( U const & s ) : - x(value_type(s)) + x(static_cast(s)) {} ////////////////////////////////////// @@ -133,7 +133,7 @@ namespace detail ( tvec1 const & v ) : - x(value_type(v.x)) + x(static_cast(v.x)) {} template @@ -142,7 +142,7 @@ namespace detail ( tvec2 const & v ) : - x(value_type(v.x)) + x(static_cast(v.x)) {} template @@ -151,7 +151,7 @@ namespace detail ( tvec3 const & v ) : - x(value_type(v.x)) + x(static_cast(v.x)) {} template @@ -160,7 +160,7 @@ namespace detail ( tvec4 const & v ) : - x(value_type(v.x)) + x(static_cast(v.x)) {} ////////////////////////////////////// @@ -183,7 +183,7 @@ namespace detail tvec1 const & v ) { - this->x = T(v.x); + this->x = static_cast(v.x); return *this; } @@ -194,7 +194,7 @@ namespace detail U const & s ) { - this->x += T(s); + this->x += static_cast(s); return *this; } @@ -205,7 +205,7 @@ namespace detail tvec1 const & v ) { - this->x += T(v.x); + this->x += static_cast(v.x); return *this; } @@ -216,7 +216,7 @@ namespace detail U const & s ) { - this->x -= T(s); + this->x -= static_cast(s); return *this; } @@ -227,7 +227,7 @@ namespace detail tvec1 const & v ) { - this->x -= T(v.x); + this->x -= static_cast(v.x); return *this; } @@ -238,7 +238,7 @@ namespace detail U const & s ) { - this->x *= T(s); + this->x *= static_cast(s); return *this; } @@ -249,7 +249,7 @@ namespace detail tvec1 const & v ) { - this->x *= T(v.x); + this->x *= static_cast(v.x); return *this; } @@ -260,7 +260,7 @@ namespace detail U const & s ) { - this->x /= T(s); + this->x /= static_cast(s); return *this; } @@ -271,7 +271,7 @@ namespace detail tvec1 const & v ) { - this->x /= T(v.x); + this->x /= static_cast(v.x); return *this; } @@ -341,7 +341,7 @@ namespace detail U const & s ) { - this->x %= T(s); + this->x %= static_cast(s); return *this; } @@ -352,7 +352,7 @@ namespace detail tvec1 const & v ) { - this->x %= T(v.x); + this->x %= static_cast(v.x); return *this; } @@ -363,7 +363,7 @@ namespace detail U const & s ) { - this->x &= T(s); + this->x &= static_cast(s); return *this; } @@ -374,7 +374,7 @@ namespace detail tvec1 const & v ) { - this->x &= T(v.x); + this->x &= static_cast(v.x); return *this; } @@ -385,7 +385,7 @@ namespace detail U const & s ) { - this->x |= T(s); + this->x |= static_cast(s); return *this; } @@ -407,7 +407,7 @@ namespace detail U const & s ) { - this->x ^= T(s); + this->x ^= static_cast(s); return *this; } @@ -418,7 +418,7 @@ namespace detail tvec1 const & v ) { - this->x ^= T(v.x); + this->x ^= static_cast(v.x); return *this; } @@ -429,7 +429,7 @@ namespace detail U const & s ) { - this->x <<= T(s); + this->x <<= static_cast(s); return *this; } @@ -440,7 +440,7 @@ namespace detail tvec1 const & v ) { - this->x <<= T(v.x); + this->x <<= static_cast(v.x); return *this; } @@ -451,7 +451,7 @@ namespace detail U const & s ) { - this->x >>= T(s); + this->x >>= static_cast(s); return *this; } @@ -462,7 +462,7 @@ namespace detail tvec1 const & v ) { - this->x >>= T(v.x); + this->x >>= static_cast(v.x); return *this; } @@ -534,7 +534,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator+ ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -544,7 +544,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator+ ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -568,7 +568,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator- ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -578,7 +578,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator- ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -602,7 +602,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator* ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -612,7 +612,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator* ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -636,7 +636,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator/ ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -646,7 +646,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator/ ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -705,7 +705,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator% ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -715,7 +715,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator% ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -738,7 +738,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator& ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -748,7 +748,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator& ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -771,7 +771,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator| ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -781,7 +781,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator| ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -804,7 +804,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator^ ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -814,7 +814,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator^ ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -837,7 +837,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator<< ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -847,7 +847,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator<< ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { @@ -870,7 +870,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec1 operator>> ( tvec1 const & v, - typename tvec1::value_type const & s + typename tvec1::T const & s ) { return tvec1( @@ -880,7 +880,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec1 operator>> ( - typename tvec1::value_type const & s, + typename tvec1::T const & s, tvec1 const & v ) { diff --git a/glm/core/type_vec2.hpp b/glm/core/type_vec2.hpp index 8da617b4..d0c4404b 100644 --- a/glm/core/type_vec2.hpp +++ b/glm/core/type_vec2.hpp @@ -82,7 +82,7 @@ namespace detail // Accesses GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; + GLM_FUNC_DECL T const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors @@ -98,10 +98,10 @@ namespace detail GLM_FUNC_DECL explicit tvec2( ctor); GLM_FUNC_DECL explicit tvec2( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tvec2( - value_type const & s1, - value_type const & s2); + T const & s1, + T const & s2); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/core/type_vec2.inl b/glm/core/type_vec2.inl index a19fed63..1d437fec 100644 --- a/glm/core/type_vec2.inl +++ b/glm/core/type_vec2.inl @@ -57,8 +57,8 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2::tvec2() : - x(value_type(0)), - y(value_type(0)) + x(0), + y(0) {} template @@ -93,7 +93,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2::tvec2 ( - value_type const & s + T const & s ) : x(s), y(s) @@ -102,8 +102,8 @@ namespace detail template GLM_FUNC_QUALIFIER tvec2::tvec2 ( - value_type const & s1, - value_type const & s2 + T const & s1, + T const & s2 ) : x(s1), y(s2) @@ -130,8 +130,8 @@ namespace detail ( U const & x ) : - x(value_type(x)), - y(value_type(x)) + x(static_cast(x)), + y(static_cast(x)) {} template @@ -141,8 +141,8 @@ namespace detail U const & a, V const & b ) : - x(value_type(a)), - y(value_type(b)) + x(static_cast(a)), + y(static_cast(b)) {} ////////////////////////////////////// @@ -154,8 +154,8 @@ namespace detail ( tvec2 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)) + x(static_cast(v.x)), + y(static_cast(v.y)) {} template @@ -164,8 +164,8 @@ namespace detail ( tvec3 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)) + x(static_cast(v.x)), + y(static_cast(v.y)) {} template @@ -174,8 +174,8 @@ namespace detail ( tvec4 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)) + x(static_cast(v.x)), + y(static_cast(v.y)) {} ////////////////////////////////////// @@ -199,8 +199,8 @@ namespace detail tvec2 const & v ) { - this->x = T(v.x); - this->y = T(v.y); + this->x = static_cast(v.x); + this->y = static_cast(v.y); return *this; } @@ -211,8 +211,8 @@ namespace detail U const & s ) { - this->x += T(s); - this->y += T(s); + this->x += static_cast(s); + this->y += static_cast(s); return *this; } @@ -223,8 +223,8 @@ namespace detail tvec2 const & v ) { - this->x += T(v.x); - this->y += T(v.y); + this->x += static_cast(v.x); + this->y += static_cast(v.y); return *this; } @@ -235,8 +235,8 @@ namespace detail U const & s ) { - this->x -= T(s); - this->y -= T(s); + this->x -= static_cast(s); + this->y -= static_cast(s); return *this; } @@ -247,8 +247,8 @@ namespace detail tvec2 const & v ) { - this->x -= T(v.x); - this->y -= T(v.y); + this->x -= static_cast(v.x); + this->y -= static_cast(v.y); return *this; } @@ -259,8 +259,8 @@ namespace detail U const & s ) { - this->x *= T(s); - this->y *= T(s); + this->x *= static_cast(s); + this->y *= static_cast(s); return *this; } @@ -271,8 +271,8 @@ namespace detail tvec2 const & v ) { - this->x *= T(v.x); - this->y *= T(v.y); + this->x *= static_cast(v.x); + this->y *= static_cast(v.y); return *this; } @@ -283,8 +283,8 @@ namespace detail U const & s ) { - this->x /= T(s); - this->y /= T(s); + this->x /= static_cast(s); + this->y /= static_cast(s); return *this; } @@ -295,8 +295,8 @@ namespace detail tvec2 const & v ) { - this->x /= T(v.x); - this->y /= T(v.y); + this->x /= static_cast(v.x); + this->y /= static_cast(v.y); return *this; } @@ -368,8 +368,8 @@ namespace detail U const & s ) { - this->x %= T(s); - this->y %= T(s); + this->x %= static_cast(s); + this->y %= static_cast(s); return *this; } @@ -380,8 +380,8 @@ namespace detail tvec2 const & v ) { - this->x %= T(v.x); - this->y %= T(v.y); + this->x %= static_cast(v.x); + this->y %= static_cast(v.y); return *this; } @@ -392,8 +392,8 @@ namespace detail U const & s ) { - this->x &= T(s); - this->y &= T(s); + this->x &= static_cast(s); + this->y &= static_cast(s); return *this; } @@ -404,8 +404,8 @@ namespace detail tvec2 const & v ) { - this->x &= T(v.x); - this->y &= T(v.y); + this->x &= static_cast(v.x); + this->y &= static_cast(v.y); return *this; } @@ -416,8 +416,8 @@ namespace detail U const & s ) { - this->x |= T(s); - this->y |= T(s); + this->x |= static_cast(s); + this->y |= static_cast(s); return *this; } @@ -428,8 +428,8 @@ namespace detail tvec2 const & v ) { - this->x |= T(v.x); - this->y |= T(v.y); + this->x |= static_cast(v.x); + this->y |= static_cast(v.y); return *this; } @@ -440,8 +440,8 @@ namespace detail U const & s ) { - this->x ^= T(s); - this->y ^= T(s); + this->x ^= static_cast(s); + this->y ^= static_cast(s); return *this; } @@ -452,8 +452,8 @@ namespace detail tvec2 const & v ) { - this->x ^= T(v.x); - this->y ^= T(v.y); + this->x ^= static_cast(v.x); + this->y ^= static_cast(v.y); return *this; } @@ -464,8 +464,8 @@ namespace detail U const & s ) { - this->x <<= T(s); - this->y <<= T(s); + this->x <<= static_cast(s); + this->y <<= static_cast(s); return *this; } @@ -476,8 +476,8 @@ namespace detail tvec2 const & v ) { - this->x <<= T(v.x); - this->y <<= T(v.y); + this->x <<= static_cast(v.x); + this->y <<= static_cast(v.y); return *this; } @@ -488,8 +488,8 @@ namespace detail U const & s ) { - this->x >>= T(s); - this->y >>= T(s); + this->x >>= static_cast(s); + this->y >>= static_cast(s); return *this; } @@ -500,8 +500,8 @@ namespace detail tvec2 const & v ) { - this->x >>= T(v.x); - this->y >>= T(v.y); + this->x >>= static_cast(v.x); + this->y >>= static_cast(v.y); return *this; } @@ -582,8 +582,8 @@ namespace detail ) { return tvec2( - v.x + T(s), - v.y + T(s)); + v.x + s, + v.y + s); } template @@ -594,8 +594,8 @@ namespace detail ) { return tvec2( - T(s) + v.x, - T(s) + v.y); + s + v.x, + s + v.y); } template @@ -606,8 +606,8 @@ namespace detail ) { return tvec2( - v1.x + T(v2.x), - v1.y + T(v2.y)); + v1.x + v2.x, + v1.y + v2.y); } //operator- @@ -619,8 +619,8 @@ namespace detail ) { return tvec2( - v.x - T(s), - v.y - T(s)); + v.x - s, + v.y - s); } template @@ -631,8 +631,8 @@ namespace detail ) { return tvec2( - T(s) - v.x, - T(s) - v.y); + s - v.x, + s - v.y); } template @@ -643,8 +643,8 @@ namespace detail ) { return tvec2( - v1.x - T(v2.x), - v1.y - T(v2.y)); + v1.x - v2.x, + v1.y - v2.y); } //operator* @@ -656,8 +656,8 @@ namespace detail ) { return tvec2( - v.x * T(s), - v.y * T(s)); + v.x * s, + v.y * s); } template @@ -668,8 +668,8 @@ namespace detail ) { return tvec2( - T(s) * v.x, - T(s) * v.y); + s * v.x, + s * v.y); } template @@ -680,8 +680,8 @@ namespace detail ) { return tvec2( - v1.x * T(v2.x), - v1.y * T(v2.y)); + v1.x * v2.x, + v1.y * v2.y); } //operator/ @@ -693,8 +693,8 @@ namespace detail ) { return tvec2( - v.x / T(s), - v.y / T(s)); + v.x / s, + v.y / s); } template @@ -705,8 +705,8 @@ namespace detail ) { return tvec2( - T(s) / v.x, - T(s) / v.y); + s / v.x, + s / v.y); } template @@ -717,8 +717,8 @@ namespace detail ) { return tvec2( - v1.x / T(v2.x), - v1.y / T(v2.y)); + v1.x / v2.x, + v1.y / v2.y); } // Unary constant operators @@ -744,8 +744,8 @@ namespace detail ) { return tvec2( - v.x % T(s), - v.y % T(s)); + v.x % s, + v.y % s); } template @@ -756,8 +756,8 @@ namespace detail ) { return tvec2( - T(s) % v.x, - T(s) % v.y); + s % v.x, + s % v.y); } template @@ -768,8 +768,8 @@ namespace detail ) { return tvec2( - v1.x % T(v2.x), - v1.y % T(v2.y)); + v1.x % v2.x, + v1.y % v2.y); } template @@ -780,8 +780,8 @@ namespace detail ) { return tvec2( - v.x & T(s), - v.y & T(s)); + v.x & s, + v.y & s); } template @@ -792,8 +792,8 @@ namespace detail ) { return tvec2( - T(s) & v.x, - T(s) & v.y); + s & v.x, + s & v.y); } template @@ -804,8 +804,8 @@ namespace detail ) { return tvec2( - v1.x & T(v2.x), - v1.y & T(v2.y)); + v1.x & v2.x, + v1.y & v2.y); } template @@ -816,8 +816,8 @@ namespace detail ) { return tvec2( - v.x | T(s), - v.y | T(s)); + v.x | s, + v.y | s); } template @@ -828,8 +828,8 @@ namespace detail ) { return tvec2( - T(s) | v.x, - T(s) | v.y); + s | v.x, + s | v.y); } template @@ -840,8 +840,8 @@ namespace detail ) { return tvec2( - v1.x | T(v2.x), - v1.y | T(v2.y)); + v1.x | v2.x, + v1.y | v2.y); } template @@ -852,8 +852,8 @@ namespace detail ) { return tvec2( - v.x ^ T(s), - v.y ^ T(s)); + v.x ^ s, + v.y ^ s); } template @@ -864,8 +864,8 @@ namespace detail ) { return tvec2( - T(s) ^ v.x, - T(s) ^ v.y); + s ^ v.x, + s ^ v.y); } template @@ -876,8 +876,8 @@ namespace detail ) { return tvec2( - v1.x ^ T(v2.x), - v1.y ^ T(v2.y)); + v1.x ^ v2.x, + v1.y ^ v2.y); } template @@ -888,8 +888,8 @@ namespace detail ) { return tvec2( - v.x << T(s), - v.y << T(s)); + v.x << s, + v.y << s); } template @@ -900,8 +900,8 @@ namespace detail ) { return tvec2( - s << T(v.x), - s << T(v.y)); + s << v.x, + s << v.y); } template @@ -912,8 +912,8 @@ namespace detail ) { return tvec2( - v1.x << T(v2.x), - v1.y << T(v2.y)); + v1.x << v2.x, + v1.y << v2.y); } template @@ -924,8 +924,8 @@ namespace detail ) { return tvec2( - v.x >> T(s), - v.y >> T(s)); + v.x >> s, + v.y >> s); } template @@ -936,8 +936,8 @@ namespace detail ) { return tvec2( - T(s) >> v.x, - T(s) >> v.y); + s >> v.x, + s >> v.y); } template @@ -948,8 +948,8 @@ namespace detail ) { return tvec2( - v1.x >> T(v2.x), - v1.y >> T(v2.y)); + v1.x >> v2.x, + v1.y >> v2.y); } template diff --git a/glm/core/type_vec3.hpp b/glm/core/type_vec3.hpp index ba35ea33..da9ff39a 100644 --- a/glm/core/type_vec3.hpp +++ b/glm/core/type_vec3.hpp @@ -83,7 +83,7 @@ namespace detail // Accesses GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; + GLM_FUNC_DECL T const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors @@ -99,11 +99,11 @@ namespace detail GLM_FUNC_DECL explicit tvec3( ctor); GLM_FUNC_DECL explicit tvec3( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tvec3( - value_type const & s1, - value_type const & s2, - value_type const & s3); + T const & s1, + T const & s2, + T const & s3); ////////////////////////////////////// // Conversion scalar constructors diff --git a/glm/core/type_vec3.inl b/glm/core/type_vec3.inl index 439a6131..b94731d1 100644 --- a/glm/core/type_vec3.inl +++ b/glm/core/type_vec3.inl @@ -57,9 +57,9 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3::tvec3() : - x(value_type(0)), - y(value_type(0)), - z(value_type(0)) + x(0), + y(0), + z(0) {} template @@ -96,7 +96,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3::tvec3 ( - value_type const & s + T const & s ) : x(s), y(s), @@ -106,9 +106,9 @@ namespace detail template GLM_FUNC_QUALIFIER tvec3::tvec3 ( - value_type const & s0, - value_type const & s1, - value_type const & s2 + T const & s0, + T const & s1, + T const & s2 ) : x(s0), y(s1), @@ -135,9 +135,9 @@ namespace detail tref2 const & v, B const & s ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(s)) {} template @@ -147,9 +147,9 @@ namespace detail A const & s, tref2 const & v ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)) + x(static_cast(s)), + y(static_cast(v.x)), + z(static_cast(v.y)) {} ////////////////////////////////////// @@ -161,9 +161,9 @@ namespace detail ( U const & s ) : - x(value_type(s)), - y(value_type(s)), - z(value_type(s)) + x(static_cast(s)), + y(static_cast(s)), + z(static_cast(s)) {} template @@ -174,9 +174,9 @@ namespace detail B const & y, C const & z ) : - x(value_type(x)), - y(value_type(y)), - z(value_type(z)) + x(static_cast(x)), + y(static_cast(y)), + z(static_cast(z)) {} ////////////////////////////////////// @@ -189,9 +189,9 @@ namespace detail tvec2 const & v, B const & s ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(s)) {} template @@ -201,9 +201,9 @@ namespace detail A const & s, tvec2 const & v ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)) + x(static_cast(s)), + y(static_cast(v.x)), + z(static_cast(v.y)) {} template @@ -212,9 +212,9 @@ namespace detail ( tvec3 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(v.z)) {} template @@ -223,9 +223,9 @@ namespace detail ( tvec4 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(v.z)) {} ////////////////////////////////////// @@ -250,9 +250,9 @@ namespace detail tvec3 const & v ) { - this->x = T(v.x); - this->y = T(v.y); - this->z = T(v.z); + this->x = static_cast(v.x); + this->y = static_cast(v.y); + this->z = static_cast(v.z); return *this; } @@ -263,9 +263,9 @@ namespace detail U const & s ) { - this->x += T(s); - this->y += T(s); - this->z += T(s); + this->x += static_cast(s); + this->y += static_cast(s); + this->z += static_cast(s); return *this; } @@ -276,9 +276,9 @@ namespace detail tvec3 const & v ) { - this->x += T(v.x); - this->y += T(v.y); - this->z += T(v.z); + this->x += static_cast(v.x); + this->y += static_cast(v.y); + this->z += static_cast(v.z); return *this; } @@ -289,9 +289,9 @@ namespace detail U const & s ) { - this->x -= T(s); - this->y -= T(s); - this->z -= T(s); + this->x -= static_cast(s); + this->y -= static_cast(s); + this->z -= static_cast(s); return *this; } @@ -302,9 +302,9 @@ namespace detail tvec3 const & v ) { - this->x -= T(v.x); - this->y -= T(v.y); - this->z -= T(v.z); + this->x -= static_cast(v.x); + this->y -= static_cast(v.y); + this->z -= static_cast(v.z); return *this; } @@ -315,9 +315,9 @@ namespace detail U const & s ) { - this->x *= T(s); - this->y *= T(s); - this->z *= T(s); + this->x *= static_cast(s); + this->y *= static_cast(s); + this->z *= static_cast(s); return *this; } @@ -328,9 +328,9 @@ namespace detail tvec3 const & v ) { - this->x *= T(v.x); - this->y *= T(v.y); - this->z *= T(v.z); + this->x *= static_cast(v.x); + this->y *= static_cast(v.y); + this->z *= static_cast(v.z); return *this; } @@ -341,9 +341,9 @@ namespace detail U const & s ) { - this->x /= T(s); - this->y /= T(s); - this->z /= T(s); + this->x /= static_cast(s); + this->y /= static_cast(s); + this->z /= static_cast(s); return *this; } @@ -354,9 +354,9 @@ namespace detail tvec3 const & v ) { - this->x /= T(v.x); - this->y /= T(v.y); - this->z /= T(v.z); + this->x /= static_cast(v.x); + this->y /= static_cast(v.y); + this->z /= static_cast(v.z); return *this; } @@ -547,9 +547,9 @@ namespace detail tvec3 const & v ) { - this->x <<= T(v.x); - this->y <<= T(v.y); - this->z <<= T(v.z); + this->x <<= static_cast(v.x); + this->y <<= static_cast(v.y); + this->z <<= static_cast(v.z); return *this; } @@ -560,9 +560,9 @@ namespace detail U const & s ) { - this->x >>= T(s); - this->y >>= T(s); - this->z >>= T(s); + this->x >>= static_cast(s); + this->y >>= static_cast(s); + this->z >>= static_cast(s); return *this; } @@ -573,9 +573,9 @@ namespace detail tvec3 const & v ) { - this->x >>= T(v.x); - this->y >>= T(v.y); - this->z >>= T(v.z); + this->x >>= static_cast(v.x); + this->y >>= static_cast(v.y); + this->z >>= static_cast(v.z); return *this; } @@ -671,9 +671,9 @@ namespace detail ) { return tvec3( - v.x + T(s), - v.y + T(s), - v.z + T(s)); + v.x + s, + v.y + s, + v.z + s); } template @@ -684,9 +684,9 @@ namespace detail ) { return tvec3( - T(s) + v.x, - T(s) + v.y, - T(s) + v.z); + s + v.x, + s + v.y, + s + v.z); } template @@ -697,9 +697,9 @@ namespace detail ) { return tvec3( - v1.x + T(v2.x), - v1.y + T(v2.y), - v1.z + T(v2.z)); + v1.x + v2.x, + v1.y + v2.y, + v1.z + v2.z); } //operator- @@ -711,9 +711,9 @@ namespace detail ) { return tvec3( - v.x - T(s), - v.y - T(s), - v.z - T(s)); + v.x - s, + v.y - s, + v.z - s); } template @@ -724,9 +724,9 @@ namespace detail ) { return tvec3( - T(s) - v.x, - T(s) - v.y, - T(s) - v.z); + s - v.x, + s - v.y, + s - v.z); } template @@ -737,9 +737,9 @@ namespace detail ) { return tvec3( - v1.x - T(v2.x), - v1.y - T(v2.y), - v1.z - T(v2.z)); + v1.x - v2.x, + v1.y - v2.y, + v1.z - v2.z); } //operator* @@ -751,9 +751,9 @@ namespace detail ) { return tvec3( - v.x * T(s), - v.y * T(s), - v.z * T(s)); + v.x * s, + v.y * s, + v.z * s); } template @@ -764,9 +764,9 @@ namespace detail ) { return tvec3( - T(s) * v.x, - T(s) * v.y, - T(s) * v.z); + s * v.x, + s * v.y, + s * v.z); } template @@ -777,9 +777,9 @@ namespace detail ) { return tvec3( - v1.x * T(v2.x), - v1.y * T(v2.y), - v1.z * T(v2.z)); + v1.x * v2.x, + v1.y * v2.y, + v1.z * v2.z); } //operator/ @@ -791,9 +791,9 @@ namespace detail ) { return tvec3( - v.x / T(s), - v.y / T(s), - v.z / T(s)); + v.x / s, + v.y / s, + v.z / s); } template @@ -804,9 +804,9 @@ namespace detail ) { return tvec3( - T(s) / v.x, - T(s) / v.y, - T(s) / v.z); + s / v.x, + s / v.y, + s / v.z); } template @@ -817,9 +817,9 @@ namespace detail ) { return tvec3( - v1.x / T(v2.x), - v1.y / T(v2.y), - v1.z / T(v2.z)); + v1.x / v2.x, + v1.y / v2.y, + v1.z / v2.z); } // Unary constant operators @@ -846,9 +846,9 @@ namespace detail ) { return tvec3( - v.x % T(s), - v.y % T(s), - v.z % T(s)); + v.x % s, + v.y % s, + v.z % s); } template @@ -859,9 +859,9 @@ namespace detail ) { return tvec3( - T(s) % v.x, - T(s) % v.y, - T(s) % v.z); + s % v.x, + s % v.y, + s % v.z); } template @@ -872,9 +872,9 @@ namespace detail ) { return tvec3( - v1.x % T(v2.x), - v1.y % T(v2.y), - v1.z % T(v2.z)); + v1.x % v2.x, + v1.y % v2.y, + v1.z % v2.z); } template @@ -885,9 +885,9 @@ namespace detail ) { return tvec3( - v.x & T(s), - v.y & T(s), - v.z & T(s)); + v.x & s, + v.y & s, + v.z & s); } template @@ -898,9 +898,9 @@ namespace detail ) { return tvec3( - T(s) & v.x, - T(s) & v.y, - T(s) & v.z); + s & v.x, + s & v.y, + s & v.z); } template @@ -911,9 +911,9 @@ namespace detail ) { return tvec3( - v1.x & T(v2.x), - v1.y & T(v2.y), - v1.z & T(v2.z)); + v1.x & v2.x, + v1.y & v2.y, + v1.z & v2.z); } template @@ -924,9 +924,9 @@ namespace detail ) { return tvec3( - v.x | T(s), - v.y | T(s), - v.z | T(s)); + v.x | s, + v.y | s, + v.z | s); } template @@ -937,9 +937,9 @@ namespace detail ) { return tvec3( - T(s) | v.x, - T(s) | v.y, - T(s) | v.z); + s | v.x, + s | v.y, + s | v.z); } template @@ -950,9 +950,9 @@ namespace detail ) { return tvec3( - v1.x | T(v2.x), - v1.y | T(v2.y), - v1.z | T(v2.z)); + v1.x | v2.x, + v1.y | v2.y, + v1.z | v2.z); } template @@ -963,9 +963,9 @@ namespace detail ) { return tvec3( - v.x ^ T(s), - v.y ^ T(s), - v.z ^ T(s)); + v.x ^ s, + v.y ^ s, + v.z ^ s); } template diff --git a/glm/core/type_vec4.hpp b/glm/core/type_vec4.hpp index c725e383..6c26bc6b 100644 --- a/glm/core/type_vec4.hpp +++ b/glm/core/type_vec4.hpp @@ -84,7 +84,7 @@ namespace detail // Accesses GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; + GLM_FUNC_DECL T const & operator[](size_type i) const; ////////////////////////////////////// // Implicit basic constructors @@ -100,12 +100,12 @@ namespace detail GLM_FUNC_DECL explicit tvec4( ctor); GLM_FUNC_DECL explicit tvec4( - value_type const & s); + T const & s); GLM_FUNC_DECL explicit tvec4( - value_type const & s0, - value_type const & s1, - value_type const & s2, - value_type const & s3); + T const & s0, + T const & s1, + T const & s2, + T const & s3); ////////////////////////////////////// // Conversion scalar constructors @@ -310,37 +310,37 @@ namespace detail GLM_DETAIL_IS_VECTOR(tvec4); template - GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator+(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator+(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator+(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator-(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator-(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator-(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator- (tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator*(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator*(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator*(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator*(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator/(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator/(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator/(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator/(tvec4 const & v1, tvec4 const & v2); @@ -355,55 +355,55 @@ namespace detail GLM_FUNC_DECL bool operator!=(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator%(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator%(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator%(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator%(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator%(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator&(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator&(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator&(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator&(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator&(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator|(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator|(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator|(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator|(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator|(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator^(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator^(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator^(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator^(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator^(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator<<(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator<<(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator<<(tvec4 const & v1, tvec4 const & v2); template - GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v, typename tvec4::value_type const & s); + GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v, typename tvec4::T const & s); template - GLM_FUNC_DECL tvec4 operator>>(typename tvec4::value_type const & s, tvec4 const & v); + GLM_FUNC_DECL tvec4 operator>>(typename tvec4::T const & s, tvec4 const & v); template GLM_FUNC_DECL tvec4 operator>>(tvec4 const & v1, tvec4 const & v2); diff --git a/glm/core/type_vec4.inl b/glm/core/type_vec4.inl index 9c2734e9..c06d0b63 100644 --- a/glm/core/type_vec4.inl +++ b/glm/core/type_vec4.inl @@ -63,10 +63,10 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4::tvec4() : - x(value_type(0)), - y(value_type(0)), - z(value_type(0)), - w(value_type(0)) + x(0), + y(0), + z(0), + w(0) {} template @@ -105,7 +105,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4::tvec4 ( - value_type const & s + T const & s ) : x(s), y(s), @@ -116,10 +116,10 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4::tvec4 ( - value_type const & s1, - value_type const & s2, - value_type const & s3, - value_type const & s4 + T const & s1, + T const & s2, + T const & s3, + T const & s4 ) : x(s1), y(s2), @@ -149,10 +149,10 @@ namespace detail B const & s1, C const & s2 ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s1)), - w(value_type(s2)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(s1)), + w(static_cast(s2)) {} template @@ -163,10 +163,10 @@ namespace detail tref2 const & v, C const & s2 ) : - x(value_type(s1)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(s2)) + x(static_cast(s1)), + y(static_cast(v.x)), + z(static_cast(v.y)), + w(static_cast(s2)) {} template @@ -177,10 +177,10 @@ namespace detail B const & s2, tref2 const & v ) : - x(value_type(s1)), - y(value_type(s2)), - z(value_type(v.x)), - w(value_type(v.y)) + x(static_cast(s1)), + y(static_cast(s2)), + z(static_cast(v.x)), + w(static_cast(v.y)) {} template @@ -190,10 +190,10 @@ namespace detail tref3 const & v, B const & s ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(s)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(v.z)), + w(static_cast(s)) {} template @@ -203,10 +203,10 @@ namespace detail A const & s, tref3 const & v ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(v.z)) + x(static_cast(s)), + y(static_cast(v.x)), + z(static_cast(v.y)), + w(static_cast(v.z)) {} template @@ -216,10 +216,10 @@ namespace detail tref2 const & v1, tref2 const & v2 ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) + x(static_cast(v1.x)), + y(static_cast(v1.y)), + z(static_cast(v2.x)), + w(static_cast(v2.y)) {} template @@ -229,10 +229,10 @@ namespace detail tvec2 const & v1, tref2 const & v2 ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) + x(static_cast(v1.x)), + y(static_cast(v1.y)), + z(static_cast(v2.x)), + w(static_cast(v2.y)) {} template @@ -242,10 +242,10 @@ namespace detail tref2 const & v1, tvec2 const & v2 ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) + x(static_cast(v1.x)), + y(static_cast(v1.y)), + z(static_cast(v2.x)), + w(static_cast(v2.y)) {} ////////////////////////////////////// @@ -257,10 +257,10 @@ namespace detail ( U const & x ) : - x(value_type(x)), - y(value_type(x)), - z(value_type(x)), - w(value_type(x)) + x(static_cast(x)), + y(static_cast(x)), + z(static_cast(x)), + w(static_cast(x)) {} template @@ -272,22 +272,22 @@ namespace detail C const & z, D const & w ) : - x(value_type(x)), - y(value_type(y)), - z(value_type(z)), - w(value_type(w)) + x(static_cast(x)), + y(static_cast(y)), + z(static_cast(z)), + w(static_cast(w)) {} template template GLM_FUNC_QUALIFIER tvec4::tvec4 ( - tvec4 const & v + tvec4 const & v ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(v.w)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(v.z)), + w(static_cast(v.w)) {} ////////////////////////////////////// @@ -301,10 +301,10 @@ namespace detail B const & s1, C const & s2 ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s1)), - w(value_type(s2)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(s1)), + w(static_cast(s2)) {} template @@ -315,10 +315,10 @@ namespace detail tvec2 const & v, C const & s2 ) : - x(value_type(s1)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(s2)) + x(static_cast(s1)), + y(static_cast(v.x)), + z(static_cast(v.y)), + w(static_cast(s2)) {} template @@ -329,10 +329,10 @@ namespace detail B const & s2, tvec2 const & v ) : - x(value_type(s1)), - y(value_type(s2)), - z(value_type(v.x)), - w(value_type(v.y)) + x(static_cast(s1)), + y(static_cast(s2)), + z(static_cast(v.x)), + w(static_cast(v.y)) {} template @@ -342,10 +342,10 @@ namespace detail tvec3 const & v, B const & s ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(s)) + x(static_cast(v.x)), + y(static_cast(v.y)), + z(static_cast(v.z)), + w(static_cast(s)) {} template @@ -355,10 +355,10 @@ namespace detail A const & s, tvec3 const & v ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(v.z)) + x(static_cast(s)), + y(static_cast(v.x)), + z(static_cast(v.y)), + w(static_cast(v.z)) {} template @@ -368,10 +368,10 @@ namespace detail tvec2 const & v1, tvec2 const & v2 ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) + x(static_cast(v1.x)), + y(static_cast(v1.y)), + z(static_cast(v2.x)), + w(static_cast(v2.y)) {} ////////////////////////////////////// @@ -397,10 +397,10 @@ namespace detail tvec4 const & v ) { - this->x = T(v.x); - this->y = T(v.y); - this->z = T(v.z); - this->w = T(v.w); + this->x = static_cast(v.x); + this->y = static_cast(v.y); + this->z = static_cast(v.z); + this->w = static_cast(v.w); return *this; } @@ -411,10 +411,10 @@ namespace detail U const & s ) { - this->x += T(s); - this->y += T(s); - this->z += T(s); - this->w += T(s); + this->x += static_cast(s); + this->y += static_cast(s); + this->z += static_cast(s); + this->w += static_cast(s); return *this; } @@ -425,10 +425,10 @@ namespace detail tvec4 const & v ) { - this->x += T(v.x); - this->y += T(v.y); - this->z += T(v.z); - this->w += T(v.w); + this->x += static_cast(v.x); + this->y += static_cast(v.y); + this->z += static_cast(v.z); + this->w += static_cast(v.w); return *this; } @@ -439,10 +439,10 @@ namespace detail U const & s ) { - this->x -= T(s); - this->y -= T(s); - this->z -= T(s); - this->w -= T(s); + this->x -= static_cast(s); + this->y -= static_cast(s); + this->z -= static_cast(s); + this->w -= static_cast(s); return *this; } @@ -453,10 +453,10 @@ namespace detail tvec4 const & v ) { - this->x -= T(v.x); - this->y -= T(v.y); - this->z -= T(v.z); - this->w -= T(v.w); + this->x -= static_cast(v.x); + this->y -= static_cast(v.y); + this->z -= static_cast(v.z); + this->w -= static_cast(v.w); return *this; } @@ -467,10 +467,10 @@ namespace detail U const & s ) { - this->x *= T(s); - this->y *= T(s); - this->z *= T(s); - this->w *= T(s); + this->x *= static_cast(s); + this->y *= static_cast(s); + this->z *= static_cast(s); + this->w *= static_cast(s); return *this; } @@ -481,10 +481,10 @@ namespace detail tvec4 const & v ) { - this->x *= T(v.x); - this->y *= T(v.y); - this->z *= T(v.z); - this->w *= T(v.w); + this->x *= static_cast(v.x); + this->y *= static_cast(v.y); + this->z *= static_cast(v.z); + this->w *= static_cast(v.w); return *this; } @@ -495,10 +495,10 @@ namespace detail U const & s ) { - this->x /= T(s); - this->y /= T(s); - this->z /= T(s); - this->w /= T(s); + this->x /= static_cast(s); + this->y /= static_cast(s); + this->z /= static_cast(s); + this->w /= static_cast(s); return *this; } @@ -509,10 +509,10 @@ namespace detail tvec4 const & v ) { - this->x /= T(v.x); - this->y /= T(v.y); - this->z /= T(v.z); - this->w /= T(v.w); + this->x /= static_cast(v.x); + this->y /= static_cast(v.y); + this->z /= static_cast(v.z); + this->w /= static_cast(v.w); return *this; } @@ -565,10 +565,10 @@ namespace detail U const & s ) { - this->x %= T(s); - this->y %= T(s); - this->z %= T(s); - this->w %= T(s); + this->x %= static_cast(s); + this->y %= static_cast(s); + this->z %= static_cast(s); + this->w %= static_cast(s); return *this; } @@ -579,10 +579,10 @@ namespace detail tvec4 const & v ) { - this->x %= T(v.x); - this->y %= T(v.y); - this->z %= T(v.z); - this->w %= T(v.w); + this->x %= static_cast(v.x); + this->y %= static_cast(v.y); + this->z %= static_cast(v.z); + this->w %= static_cast(v.w); return *this; } @@ -593,10 +593,10 @@ namespace detail U const & s ) { - this->x &= T(s); - this->y &= T(s); - this->z &= T(s); - this->w &= T(s); + this->x &= static_cast(s); + this->y &= static_cast(s); + this->z &= static_cast(s); + this->w &= static_cast(s); return *this; } @@ -607,10 +607,10 @@ namespace detail tvec4 const & v ) { - this->x &= T(v.x); - this->y &= T(v.y); - this->z &= T(v.z); - this->w &= T(v.w); + this->x &= static_cast(v.x); + this->y &= static_cast(v.y); + this->z &= static_cast(v.z); + this->w &= static_cast(v.w); return *this; } @@ -621,10 +621,10 @@ namespace detail U const & s ) { - this->x |= T(s); - this->y |= T(s); - this->z |= T(s); - this->w |= T(s); + this->x |= static_cast(s); + this->y |= static_cast(s); + this->z |= static_cast(s); + this->w |= static_cast(s); return *this; } @@ -635,10 +635,10 @@ namespace detail tvec4 const & v ) { - this->x |= T(v.x); - this->y |= T(v.y); - this->z |= T(v.z); - this->w |= T(v.w); + this->x |= static_cast(v.x); + this->y |= static_cast(v.y); + this->z |= static_cast(v.z); + this->w |= static_cast(v.w); return *this; } @@ -649,10 +649,10 @@ namespace detail U const & s ) { - this->x ^= T(s); - this->y ^= T(s); - this->z ^= T(s); - this->w ^= T(s); + this->x ^= static_cast(s); + this->y ^= static_cast(s); + this->z ^= static_cast(s); + this->w ^= static_cast(s); return *this; } @@ -663,10 +663,10 @@ namespace detail tvec4 const & v ) { - this->x ^= T(v.x); - this->y ^= T(v.y); - this->z ^= T(v.z); - this->w ^= T(v.w); + this->x ^= static_cast(v.x); + this->y ^= static_cast(v.y); + this->z ^= static_cast(v.z); + this->w ^= static_cast(v.w); return *this; } @@ -677,10 +677,10 @@ namespace detail U const & s ) { - this->x <<= T(s); - this->y <<= T(s); - this->z <<= T(s); - this->w <<= T(s); + this->x <<= static_cast(s); + this->y <<= static_cast(s); + this->z <<= static_cast(s); + this->w <<= static_cast(s); return *this; } @@ -691,10 +691,10 @@ namespace detail tvec4 const & v ) { - this->x <<= T(v.x); - this->y <<= T(v.y); - this->z <<= T(v.z); - this->w <<= T(v.w); + this->x <<= static_cast(v.x); + this->y <<= static_cast(v.y); + this->z <<= static_cast(v.z); + this->w <<= static_cast(v.w); return *this; } @@ -705,10 +705,10 @@ namespace detail U const & s ) { - this->x >>= T(s); - this->y >>= T(s); - this->z >>= T(s); - this->w >>= T(s); + this->x >>= static_cast(s); + this->y >>= static_cast(s); + this->z >>= static_cast(s); + this->w >>= static_cast(s); return *this; } @@ -719,10 +719,10 @@ namespace detail tvec4 const & v ) { - this->x >>= T(v.x); - this->y >>= T(v.y); - this->z >>= T(v.z); - this->w >>= T(v.w); + this->x >>= static_cast(v.x); + this->y >>= static_cast(v.y); + this->z >>= static_cast(v.z); + this->w >>= static_cast(v.w); return *this; } @@ -830,7 +830,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator+ ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -843,7 +843,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator+ ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -873,7 +873,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator- ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -886,7 +886,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator- ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -916,7 +916,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator* ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -929,7 +929,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator* ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -959,7 +959,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator/ ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -972,7 +972,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator/ ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1041,7 +1041,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator% ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1054,7 +1054,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator% ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1083,7 +1083,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator& ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1096,7 +1096,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator& ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1125,7 +1125,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator| ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1138,7 +1138,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator| ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1167,7 +1167,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator^ ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1180,7 +1180,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator^ ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1209,7 +1209,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator<< ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1222,7 +1222,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator<< ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { @@ -1251,7 +1251,7 @@ namespace detail GLM_FUNC_QUALIFIER tvec4 operator>> ( tvec4 const & v, - typename tvec4::value_type const & s + typename tvec4::T const & s ) { return tvec4( @@ -1264,7 +1264,7 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator>> ( - typename tvec4::value_type const & s, + typename tvec4::T const & s, tvec4 const & v ) { diff --git a/glm/gtc/angle.hpp b/glm/gtc/angle.hpp index f267039c..f7b41374 100644 --- a/glm/gtc/angle.hpp +++ b/glm/gtc/angle.hpp @@ -47,7 +47,7 @@ namespace glm public: typedef T value_type; - angle(value_type const & x) : + angle(T const & x) : data(x) {} diff --git a/glm/gtc/epsilon.hpp b/glm/gtc/epsilon.hpp index be63a6a2..d37d9c54 100644 --- a/glm/gtc/epsilon.hpp +++ b/glm/gtc/epsilon.hpp @@ -61,7 +61,7 @@ namespace glm typename genType::boolType epsilonEqual( genType const & x, genType const & y, - typename genType::value_type const & epsilon); + typename genType::T const & epsilon); /// Returns the component-wise comparison of |x - y| < epsilon. /// True if this expression is satisfied. @@ -81,7 +81,7 @@ namespace glm typename genType::boolType epsilonNotEqual( genType const & x, genType const & y, - typename genType::value_type const & epsilon); + typename genType::T const & epsilon); /// Returns the component-wise comparison of |x - y| >= epsilon. /// True if this expression is not satisfied. diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index e77bae6f..6853fc73 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -180,8 +180,8 @@ namespace glm ) { detail::tmat4x4 Result(1); - Result[0][0] = T(2) / (right - left); - Result[1][1] = T(2) / (top - bottom); + Result[0][0] = static_cast(2) / (right - left); + Result[1][1] = static_cast(2) / (top - bottom); Result[2][2] = - T(2) / (zFar - zNear); Result[3][0] = - (right + left) / (right - left); Result[3][1] = - (top + bottom) / (top - bottom); @@ -199,8 +199,8 @@ namespace glm ) { detail::tmat4x4 Result(1); - Result[0][0] = T(2) / (right - left); - Result[1][1] = T(2) / (top - bottom); + Result[0][0] = static_cast(2) / (right - left); + Result[1][1] = static_cast(2) / (top - bottom); Result[2][2] = - T(1); Result[3][0] = - (right + left) / (right - left); Result[3][1] = - (top + bottom) / (top - bottom); @@ -337,8 +337,8 @@ namespace glm detail::tmat4x4 Result(T(0)); Result[0][0] = (T(2) * zNear) / (right - left); Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = T(0.0001) - T(1); - Result[2][3] = T(-1); + Result[2][2] = static_cast(0.0001) - T(1); + Result[2][3] = static_cast(-1); Result[3][2] = - (T(0.0001) - T(2)) * zNear; return Result; } diff --git a/glm/gtc/noise.inl b/glm/gtc/noise.inl index 4fb75c2f..c0445a37 100644 --- a/glm/gtc/noise.inl +++ b/glm/gtc/noise.inl @@ -128,7 +128,7 @@ namespace glm GLM_FUNC_QUALIFIER detail::tvec4 grad4(T const & j, detail::tvec4 const & ip) { detail::tvec3 pXYZ = floor(fract(detail::tvec3(j) * detail::tvec3(ip)) * T(7)) * ip[2] - T(1); - T pW = T(1.5) - dot(abs(pXYZ), detail::tvec3(1)); + T pW = static_cast(1.5) - dot(abs(pXYZ), detail::tvec3(1)); detail::tvec4 s = detail::tvec4(lessThan(detail::tvec4(pXYZ, pW), detail::tvec4(0.0))); pXYZ = pXYZ + (detail::tvec3(s) * T(2) - T(1)) * s.w; return detail::tvec4(pXYZ, pW); @@ -148,7 +148,7 @@ namespace glm detail::tvec4 i = glm::permute(glm::permute(ix) + iy); - detail::tvec4 gx = T(2) * glm::fract(i / T(41)) - T(1); + detail::tvec4 gx = static_cast(2) * glm::fract(i / T(41)) - T(1); detail::tvec4 gy = glm::abs(gx) - T(0.5); detail::tvec4 tx = glm::floor(gx + T(0.5)); gx = gx - tx; @@ -470,7 +470,7 @@ namespace glm detail::tvec4 i = permute(permute(ix) + iy); - detail::tvec4 gx = T(2) * fract(i / T(41)) - T(1); + detail::tvec4 gx = static_cast(2) * fract(i / T(41)) - T(1); detail::tvec4 gy = abs(gx) - T(0.5); detail::tvec4 tx = floor(gx + T(0.5)); gx = gx - tx; @@ -741,14 +741,14 @@ namespace glm // Gradients: 41 points uniformly over a line, mapped onto a diamond. // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 x = static_cast(2) * fract(p * C.w) - T(1); detail::tvec3 h = abs(x) - T(0.5); detail::tvec3 ox = floor(x + T(0.5)); detail::tvec3 a0 = x - ox; // Normalise gradients implicitly by scaling m // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); - m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + m *= static_cast(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); // Compute final noise value at P detail::tvec3 g; @@ -792,7 +792,7 @@ namespace glm // Gradients: 7x7 points over a square, mapped onto an octahedron. // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - T n_ = T(0.142857142857); // 1.0/7.0 + T n_ = static_cast(0.142857142857); // 1.0/7.0 detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) @@ -844,7 +844,7 @@ namespace glm -0.447213595499958); // -1 + 4 * G4 // (sqrt(5) - 1)/4 = F4, used once below - T const F4 = T(0.309016994374947451); + T const F4 = static_cast(0.309016994374947451); // First corner detail::tvec4 i = floor(v + dot(v, vec4(F4))); @@ -858,15 +858,15 @@ namespace glm detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); // i0.x = dot(isX, vec3(1.0)); //i0.x = isX.x + isX.y + isX.z; - //i0.yzw = T(1) - isX; + //i0.yzw = static_cast(1) - isX; i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); // i0.y += dot(isYZ.xy, vec2(1.0)); i0.y += isYZ.x + isYZ.y; //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); - i0.z += T(1) - isYZ.x; - i0.w += T(1) - isYZ.y; + i0.z += static_cast(1) - isYZ.x; + i0.w += static_cast(1) - isYZ.y; i0.z += isYZ.z; - i0.w += T(1) - isYZ.z; + i0.w += static_cast(1) - isYZ.z; // i0 now contains the unique values 0,1,2,3 in each channel detail::tvec4 i3 = clamp(i0, 0.0, 1.0); diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index f1782069..5f549576 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -71,13 +71,13 @@ namespace detail GLM_FUNC_DECL explicit tquat( tquat const & q); GLM_FUNC_DECL explicit tquat( - value_type const & s, + T const & s, glm::detail::tvec3 const & v); GLM_FUNC_DECL explicit tquat( - value_type const & w, - value_type const & x, - value_type const & y, - value_type const & z); + T const & w, + T const & x, + T const & y, + T const & z); // Convertions @@ -91,11 +91,11 @@ namespace detail // Accesses GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; + GLM_FUNC_DECL T const & operator[](size_type i) const; // Operators - GLM_FUNC_DECL tquat & operator*=(value_type const & s); - GLM_FUNC_DECL tquat & operator/=(value_type const & s); + GLM_FUNC_DECL tquat & operator*=(T const & s); + GLM_FUNC_DECL tquat & operator/=(T const & s); }; template diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 0c661736..a2c4962d 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -381,7 +381,7 @@ namespace detail ( detail::tquat const & x, detail::tquat const & y, - typename detail::tquat::value_type const & a + typename detail::tquat::T const & a ) { if(a <= typename detail::tquat::value_type(0)) return x; @@ -406,7 +406,7 @@ namespace detail { typename detail::tquat::value_type fSin = sqrt(T(1) - fCos * fCos); typename detail::tquat::value_type fAngle = atan(fSin, fCos); - typename detail::tquat::value_type fOneOverSin = T(1) / fSin; + typename detail::tquat::value_type fOneOverSin = static_cast(1) / fSin; k0 = sin((typename detail::tquat::value_type(1) - a) * fAngle) * fOneOverSin; k1 = sin((typename detail::tquat::value_type(0) + a) * fAngle) * fOneOverSin; } @@ -427,8 +427,8 @@ namespace detail ) { bool flip = false; - if(a <= T(0)) return x; - if(a >= T(1)) return y; + if(a <= static_cast(0)) return x; + if(a >= static_cast(1)) return y; T cos_t = dot(x, y); if(cos_t < T(0)) @@ -440,7 +440,7 @@ namespace detail T alpha(0), beta(0); if(T(1) - cos_t < 1e-7) - beta = T(1) - alpha; + beta = static_cast(1) - alpha; else { T theta = acos(cos_t); @@ -493,8 +493,8 @@ namespace detail ) { // Lerp is only defined in [0, 1] - assert(a >= T(0)); - assert(a <= T(1)); + assert(a >= static_cast(0)); + assert(a <= static_cast(1)); return x * (T(1) - a) + (y * a); } @@ -559,7 +559,7 @@ namespace detail GLM_FUNC_QUALIFIER detail::tquat rotate ( detail::tquat const & q, - typename detail::tquat::value_type const & angle, + typename detail::tquat::T const & angle, detail::tvec3 const & v ) { @@ -569,7 +569,7 @@ namespace detail typename detail::tquat::value_type len = glm::length(Tmp); if(abs(len - T(1)) > T(0.001)) { - T oneOverLen = T(1) / len; + T oneOverLen = static_cast(1) / len; Tmp.x *= oneOverLen; Tmp.y *= oneOverLen; Tmp.z *= oneOverLen; @@ -694,7 +694,7 @@ namespace detail } typename detail::tquat::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5); - typename detail::tquat::value_type mult = T(0.25) / biggestVal; + typename detail::tquat::value_type mult = static_cast(0.25) / biggestVal; detail::tquat Result; switch(biggestIndex) @@ -759,10 +759,10 @@ namespace detail detail::tquat const & x ) { - T tmp1 = T(1) - x.w * x.w; - if(tmp1 <= T(0)) + T tmp1 = static_cast(1) - x.w * x.w; + if(tmp1 <= static_cast(0)) return detail::tvec3(0, 0, 1); - T tmp2 = T(1) / sqrt(tmp1); + T tmp2 = static_cast(1) / sqrt(tmp1); return detail::tvec3(x.x * tmp2, x.y * tmp2, x.z * tmp2); } diff --git a/glm/gtx/color_space.inl b/glm/gtx/color_space.inl index b12908b3..03aeaf0d 100644 --- a/glm/gtx/color_space.inl +++ b/glm/gtx/color_space.inl @@ -15,7 +15,7 @@ namespace glm detail::tvec3 hsv = hsvColor; detail::tvec3 rgbColor; - if(hsv.y == T(0)) + if(hsv.y == static_cast(0)) // achromatic (grey) rgbColor = detail::tvec3(hsv.z); else @@ -76,20 +76,20 @@ namespace glm hsv.z = Max; - if(Max != T(0)) + if(Max != static_cast(0)) { hsv.y = Delta / hsv.z; - T h = T(0); + T h = static_cast(0); if(rgbColor.r == Max) // between yellow & magenta - h = T(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta; + h = static_cast(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta; else if(rgbColor.g == Max) // between cyan & yellow - h = T(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta; + h = static_cast(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta; else // between magenta & cyan - h = T(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; + h = static_cast(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; if(h < T(0)) hsv.x = h + T(360); @@ -99,8 +99,8 @@ namespace glm else { // If r = g = b = 0 then s = 0, h is undefined - hsv.y = T(0); - hsv.x = T(0); + hsv.y = static_cast(0); + hsv.x = static_cast(0); } return hsv; diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 4cee9524..faea885f 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -83,8 +83,8 @@ namespace detail part_type const & operator[](int i) const; // Operators - tdualquat & operator*=(value_type const & s); - tdualquat & operator/=(value_type const & s); + tdualquat & operator*=(T const & s); + tdualquat & operator/=(T const & s); }; template @@ -124,17 +124,17 @@ namespace detail template detail::tdualquat operator* ( detail::tdualquat const & q, - typename detail::tdualquat::value_type const & s); + typename detail::tdualquat::T const & s); template detail::tdualquat operator* ( - typename detail::tdualquat::value_type const & s, + typename detail::tdualquat::T const & s, detail::tdualquat const & q); template detail::tdualquat operator/ ( detail::tdualquat const & q, - typename detail::tdualquat::value_type const & s); + typename detail::tdualquat::T const & s); } //namespace detail /// @addtogroup gtc_dual_quaternion @@ -154,7 +154,7 @@ namespace detail detail::tdualquat lerp( detail::tdualquat const & x, detail::tdualquat const & y, - typename detail::tdualquat::value_type const & a); + typename detail::tdualquat::T const & a); /// Returns the q inverse. /// diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index 6c2e7ffe..9dd00730 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -117,7 +117,7 @@ namespace detail template GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator *= ( - value_type const & s + T const & s ) { this->real *= s; @@ -128,7 +128,7 @@ namespace detail template GLM_FUNC_QUALIFIER tdualquat & tdualquat::operator /= ( - value_type const & s + T const & s ) { this->real /= s; @@ -215,7 +215,7 @@ namespace detail GLM_FUNC_QUALIFIER detail::tdualquat operator* ( detail::tdualquat const & q, - typename detail::tdualquat::value_type const & s + typename detail::tdualquat::T const & s ) { return detail::tdualquat(q.real * s, q.dual * s); @@ -224,7 +224,7 @@ namespace detail template GLM_FUNC_QUALIFIER detail::tdualquat operator* ( - typename detail::tdualquat::value_type const & s, + typename detail::tdualquat::T const & s, detail::tdualquat const & q ) { @@ -235,7 +235,7 @@ namespace detail GLM_FUNC_QUALIFIER detail::tdualquat operator/ ( detail::tdualquat const & q, - typename detail::tdualquat::value_type const & s + typename detail::tdualquat::T const & s ) { return detail::tdualquat(q.real / s, q.dual / s); @@ -279,13 +279,13 @@ namespace detail ( detail::tdualquat const & x, detail::tdualquat const & y, - typename detail::tdualquat::value_type const & a + typename detail::tdualquat::T const & a ) { // Dual Quaternion Linear blend aka DLB: // Lerp is only defined in [0, 1] - assert(a >= T(0)); - assert(a <= T(1)); + assert(a >= static_cast(0)); + assert(a <= static_cast(1)); T const k = dot(x.real,y.real) < detail::tdualquat::value_type(0) ? -a : a; T const one(1); return detail::tdualquat(x * (one - a) + y * k); @@ -328,7 +328,7 @@ namespace detail detail::tquat r = x.real / length2(x.real); detail::tquat const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z); - r *= T(2); + r *= static_cast(2); T const xy = r.x * x.real.y; T const xz = r.x * x.real.z; @@ -381,8 +381,8 @@ namespace detail if(trace > T(0)) { T const r = sqrt(T(1) + trace); - T const invr = T(0.5) / r; - real.w = T(0.5) * r; + T const invr = static_cast(0.5) / r; + real.w = static_cast(0.5) * r; real.x = (x[2].y - x[1].z) * invr; real.y = (x[0].z - x[2].x) * invr; real.z = (x[1].x - x[0].y) * invr; @@ -390,8 +390,8 @@ namespace detail else if(x[0].x > x[1].y && x[0].x > x[2].z) { T const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z); - T const invr = T(0.5) / r; - real.x = T(0.5)*r; + T const invr = static_cast(0.5) / r; + real.x = static_cast(0.5)*r; real.y = (x[1].x + x[0].y) * invr; real.z = (x[0].z + x[2].x) * invr; real.w = (x[2].y - x[1].z) * invr; @@ -399,19 +399,19 @@ namespace detail else if(x[1].y > x[2].z) { T const r = sqrt(T(1) + x[1].y - x[0].x - x[2].z); - T const invr = T(0.5) / r; + T const invr = static_cast(0.5) / r; real.x = (x[1].x + x[0].y) * invr; - real.y = T(0.5) * r; + real.y = static_cast(0.5) * r; real.z = (x[2].y + x[1].z) * invr; real.w = (x[0].z - x[2].x) * invr; } else { T const r = sqrt(T(1) + x[2].z - x[0].x - x[1].y); - T const invr = T(0.5) / r; + T const invr = static_cast(0.5) / r; real.x = (x[0].z + x[2].x) * invr; real.y = (x[2].y + x[1].z) * invr; - real.z = T(0.5) * r; + real.z = static_cast(0.5) * r; real.w = (x[1].x - x[0].y) * invr; } diff --git a/glm/gtx/euler_angles.inl b/glm/gtx/euler_angles.inl index 609a2794..144072e9 100644 --- a/glm/gtx/euler_angles.inl +++ b/glm/gtx/euler_angles.inl @@ -134,19 +134,19 @@ namespace glm Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; Result[0][1] = tmp_sb * tmp_cp; Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; - Result[0][3] = T(0); + Result[0][3] = static_cast(0); Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; Result[1][1] = tmp_cb * tmp_cp; Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; - Result[1][3] = T(0); + Result[1][3] = static_cast(0); Result[2][0] = tmp_sh * tmp_cp; Result[2][1] = -tmp_sp; Result[2][2] = tmp_ch * tmp_cp; - Result[2][3] = T(0); - Result[3][0] = T(0); - Result[3][1] = T(0); - Result[3][2] = T(0); - Result[3][3] = T(1); + Result[2][3] = static_cast(0); + Result[3][0] = static_cast(0); + Result[3][1] = static_cast(0); + Result[3][2] = static_cast(0); + Result[3][3] = static_cast(1); return Result; } @@ -169,19 +169,19 @@ namespace glm Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; Result[0][1] = tmp_sb * tmp_cp; Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; - Result[0][3] = T(0); + Result[0][3] = static_cast(0); Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; Result[1][1] = tmp_cb * tmp_cp; Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; - Result[1][3] = T(0); + Result[1][3] = static_cast(0); Result[2][0] = tmp_sh * tmp_cp; Result[2][1] = -tmp_sp; Result[2][2] = tmp_ch * tmp_cp; - Result[2][3] = T(0); - Result[3][0] = T(0); - Result[3][1] = T(0); - Result[3][2] = T(0); - Result[3][3] = T(1); + Result[2][3] = static_cast(0); + Result[3][0] = static_cast(0); + Result[3][1] = static_cast(0); + Result[3][2] = static_cast(0); + Result[3][3] = static_cast(1); return Result; } diff --git a/glm/gtx/extented_min_max.hpp b/glm/gtx/extented_min_max.hpp index c6234099..adea79e4 100644 --- a/glm/gtx/extented_min_max.hpp +++ b/glm/gtx/extented_min_max.hpp @@ -69,8 +69,8 @@ namespace glm > C min( C const & x, - typename C::value_type const & y, - typename C::value_type const & z); + typename C::T const & y, + typename C::T const & z); /// Return the minimum component-wise values of 3 inputs /// @see gtx_extented_min_max @@ -102,9 +102,9 @@ namespace glm > C min( C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); + 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 @@ -136,8 +136,8 @@ namespace glm > C max( C const & x, - typename C::value_type const & y, - typename C::value_type const & z); + typename C::T const & y, + typename C::T const & z); /// Return the maximum component-wise values of 3 inputs /// @see gtx_extented_min_max @@ -169,9 +169,9 @@ namespace glm > C max( C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); + 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 diff --git a/glm/gtx/extented_min_max.inl b/glm/gtx/extented_min_max.inl index d0a74ef8..e704aa70 100644 --- a/glm/gtx/extented_min_max.inl +++ b/glm/gtx/extented_min_max.inl @@ -26,8 +26,8 @@ namespace glm GLM_FUNC_QUALIFIER C min ( C const & x, - typename C::value_type const & y, - typename C::value_type const & z + typename C::T const & y, + typename C::T const & z ) { return glm::min(glm::min(x, y), z); @@ -68,9 +68,9 @@ namespace glm GLM_FUNC_QUALIFIER C min ( C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w + 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)); @@ -109,8 +109,8 @@ namespace glm GLM_FUNC_QUALIFIER C max ( C const & x, - typename C::value_type const & y, - typename C::value_type const & z + typename C::T const & y, + typename C::T const & z ) { return glm::max(glm::max(x, y), z); @@ -151,9 +151,9 @@ namespace glm GLM_FUNC_QUALIFIER C max ( C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w + 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)); diff --git a/glm/gtx/fast_exponential.inl b/glm/gtx/fast_exponential.inl index 790fabba..5badd38f 100644 --- a/glm/gtx/fast_exponential.inl +++ b/glm/gtx/fast_exponential.inl @@ -21,7 +21,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fastPow(const T x, int y) { - T f = T(1); + T f = static_cast(1); for(int i = 0; i < y; ++i) f *= x; return f; diff --git a/glm/gtx/inertia.inl b/glm/gtx/inertia.inl index f196055b..f959fd5c 100644 --- a/glm/gtx/inertia.inl +++ b/glm/gtx/inertia.inl @@ -46,7 +46,7 @@ namespace glm { T a = Mass * Radius * Radius / T(2); detail::tmat3x3 Result(a); - Result[2][2] *= T(2); + Result[2][2] *= static_cast(2); return Result; } @@ -59,8 +59,8 @@ namespace glm { T a = Mass * Radius * Radius / T(2); detail::tmat4x4 Result(a); - Result[2][2] *= T(2); - Result[3][3] = T(1); + Result[2][2] *= static_cast(2); + Result[3][3] = static_cast(1); return Result; } @@ -71,7 +71,7 @@ namespace glm T const & Radius ) { - T a = T(2) * Mass * Radius * Radius / T(5); + T a = static_cast(2) * Mass * Radius * Radius / T(5); return detail::tmat3x3(a); } @@ -82,9 +82,9 @@ namespace glm T const & Radius ) { - T a = T(2) * Mass * Radius * Radius / T(5); + T a = static_cast(2) * Mass * Radius * Radius / T(5); detail::tmat4x4 Result(a); - Result[3][3] = T(1); + Result[3][3] = static_cast(1); return Result; } @@ -95,7 +95,7 @@ namespace glm T const & Radius ) { - T a = T(2) * Mass * Radius * Radius / T(3); + T a = static_cast(2) * Mass * Radius * Radius / T(3); return detail::tmat3x3(a); } @@ -106,9 +106,9 @@ namespace glm T const & Radius ) { - T a = T(2) * Mass * Radius * Radius / T(3); + T a = static_cast(2) * Mass * Radius * Radius / T(3); detail::tmat4x4 Result(a); - Result[3][3] = T(1); + Result[3][3] = static_cast(1); return Result; } }//namespace glm diff --git a/glm/gtx/integer.inl b/glm/gtx/integer.inl index 2fb3c974..40d6541e 100644 --- a/glm/gtx/integer.inl +++ b/glm/gtx/integer.inl @@ -61,7 +61,7 @@ namespace _detail GLM_FUNC_QUALIFIER T operator() (T const & Value) const { #if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) - return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1)); + return Value <= static_cast(1) ? T(0) : T(32) - nlz(Value - T(1)); #else return T(32) - nlz(Value - T(1)); #endif diff --git a/glm/gtx/matrix_interpolation.inl b/glm/gtx/matrix_interpolation.inl index b100a65e..9cf5d331 100644 --- a/glm/gtx/matrix_interpolation.inl +++ b/glm/gtx/matrix_interpolation.inl @@ -30,7 +30,7 @@ namespace glm axis.z = (T)0.0; return; } - angle = T(3.1415926535897932384626433832795); + angle = static_cast(3.1415926535897932384626433832795); T xx = (mat[0][0] + (T)1.0) / (T)2.0; T yy = (mat[1][1] + (T)1.0) / (T)2.0; T zz = (mat[2][2] + (T)1.0) / (T)2.0; @@ -93,7 +93,7 @@ namespace glm { T c = cos(angle); T s = sin(angle); - T t = T(1) - c; + T t = static_cast(1) - c; detail::tvec3 n = normalize(axis); return detail::tmat4x4( diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index 0b063854..fb546574 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -79,7 +79,7 @@ namespace glm template bool isIdentity( genType const & m, - typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + typename genType::T const & epsilon/* = std::numeric_limits::epsilon()*/); /// Return whether a matrix is a normalized matrix. /// From GLM_GTX_matrix_query extension. diff --git a/glm/gtx/matrix_query.inl b/glm/gtx/matrix_query.inl index 3a5aa838..16cab65a 100644 --- a/glm/gtx/matrix_query.inl +++ b/glm/gtx/matrix_query.inl @@ -54,7 +54,7 @@ namespace glm GLM_FUNC_QUALIFIER bool isIdentity ( genType const & m, - typename genType::value_type const & epsilon + typename genType::T const & epsilon ) { bool result = true; diff --git a/glm/gtx/quaternion.inl b/glm/gtx/quaternion.inl index 0a7b659a..9b3a6a7f 100644 --- a/glm/gtx/quaternion.inl +++ b/glm/gtx/quaternion.inl @@ -73,7 +73,7 @@ namespace glm detail::tquat const & q ) { - if((q.x == T(0)) && (q.y == T(0)) && (q.z == T(0))) + if((q.x == static_cast(0)) && (q.y == static_cast(0)) && (q.z == static_cast(0))) { if(q.w > T(0)) return detail::tquat(log(q.w), T(0), T(0), T(0)); @@ -116,7 +116,7 @@ namespace glm // detail::tquat const & q //) //{ - // T q0 = T(1) - dot(q, q); + // T q0 = static_cast(1) - dot(q, q); // return T(2) * (T(1) + q0) * q; //} @@ -146,7 +146,7 @@ namespace glm detail::tquat const & q ) { - T w = T(1.0) - q.x * q.x - q.y * q.y - q.z * q.z; + T w = static_cast(1.0) - q.x * q.x - q.y * q.y - q.z * q.z; if(w < T(0)) return T(0); else @@ -185,14 +185,14 @@ namespace glm T k0, k1; if(fCos > T(0.9999)) { - k0 = T(1) - a; - k1 = T(0) + a; //BUG!!! 1.0f + a; + k0 = static_cast(1) - a; + k1 = static_cast(0) + a; //BUG!!! 1.0f + a; } else { T fSin = sqrt(T(1) - fCos * fCos); T fAngle = atan(fSin, fCos); - T fOneOverSin = T(1) / fSin; + T fOneOverSin = static_cast(1) / fSin; k0 = sin((T(1) - a) * fAngle) * fOneOverSin; k1 = sin((T(0) + a) * fAngle) * fOneOverSin; } @@ -244,7 +244,7 @@ namespace glm rotationAxis = cross(orig, dest); T s = sqrt((T(1) + cosTheta) * T(2)); - T invs = T(1) / s; + T invs = static_cast(1) / s; return detail::tquat( s * T(0.5f), diff --git a/glm/gtx/rotate_normalized_axis.hpp b/glm/gtx/rotate_normalized_axis.hpp index ed1c4bc8..38007a78 100644 --- a/glm/gtx/rotate_normalized_axis.hpp +++ b/glm/gtx/rotate_normalized_axis.hpp @@ -81,7 +81,7 @@ namespace glm template detail::tquat rotateNormalizedAxis( detail::tquat const & q, - typename detail::tquat::value_type const & angle, + typename detail::tquat::T const & angle, detail::tvec3 const & axis); /// @} diff --git a/glm/gtx/rotate_normalized_axis.inl b/glm/gtx/rotate_normalized_axis.inl index e7025411..71bb4ace 100644 --- a/glm/gtx/rotate_normalized_axis.inl +++ b/glm/gtx/rotate_normalized_axis.inl @@ -73,7 +73,7 @@ namespace glm GLM_FUNC_QUALIFIER detail::tquat rotateNormalizedAxis ( detail::tquat const & q, - typename detail::tquat::value_type const & angle, + typename detail::tquat::T const & angle, detail::tvec3 const & v ) { diff --git a/glm/gtx/simd_quat.inl b/glm/gtx/simd_quat.inl index d96f48d4..1eb14f62 100644 --- a/glm/gtx/simd_quat.inl +++ b/glm/gtx/simd_quat.inl @@ -235,7 +235,7 @@ GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1 T trace = m0[0] + m1[1] + m2[2] + T(1.0); if (trace > T(0)) { - T s = T(0.5) / sqrt(trace); + T s = static_cast(0.5) / sqrt(trace); return _mm_set_ps( static_cast(T(0.25) / s), diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 9f811709..0e4744db 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -59,7 +59,7 @@ namespace glm genType const & v2, genType const & v3, genType const & v4, - typename genType::value_type const & s); + typename genType::T const & s); //! Return a point from a hermite curve. /// @see gtx_spline extension. @@ -69,7 +69,7 @@ namespace glm genType const & t1, genType const & v2, genType const & t2, - typename genType::value_type const & s); + typename genType::T const & s); //! Return a point from a cubic curve. /// @see gtx_spline extension. @@ -79,7 +79,7 @@ namespace glm genType const & v2, genType const & v3, genType const & v4, - typename genType::value_type const & s); + typename genType::T const & s); /// @} }//namespace glm diff --git a/glm/gtx/spline.inl b/glm/gtx/spline.inl index 6a6509ed..c56688fa 100644 --- a/glm/gtx/spline.inl +++ b/glm/gtx/spline.inl @@ -16,7 +16,7 @@ GLM_FUNC_QUALIFIER genType catmullRom genType const & v2, genType const & v3, genType const & v4, - typename genType::value_type const & s + typename genType::T const & s ) { typename genType::value_type s1 = s; @@ -39,7 +39,7 @@ GLM_FUNC_QUALIFIER genType hermite genType const & t1, genType const & v2, genType const & t2, - typename genType::value_type const & s + typename genType::T const & s ) { typename genType::value_type s1 = s; @@ -61,7 +61,7 @@ GLM_FUNC_QUALIFIER genType cubic genType const & v2, genType const & v3, genType const & v4, - typename genType::value_type const & s + typename genType::T const & s ) { return ((v1 * s + v2) * s + v3) * s + v4; diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 2474727d..046badf4 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -58,7 +58,7 @@ namespace glm bool areCollinear( genType const & v0, genType const & v1, - typename genType::value_type const & epsilon); + typename genType::T const & epsilon); //! Check whether two vectors are orthogonals. /// @see gtx_vector_query extensions. @@ -66,7 +66,7 @@ namespace glm bool areOrthogonal( genType const & v0, genType const & v1, - typename genType::value_type const & epsilon); + typename genType::T const & epsilon); //! Check whether a vector is normalized. /// @see gtx_vector_query extensions. @@ -102,7 +102,7 @@ namespace glm bool areOrthonormal( genType const & v0, genType const & v1, - typename genType::value_type const & epsilon); + typename genType::T const & epsilon); /// @} }// namespace glm diff --git a/glm/gtx/vector_query.inl b/glm/gtx/vector_query.inl index 2bb28e1e..a3538bf3 100644 --- a/glm/gtx/vector_query.inl +++ b/glm/gtx/vector_query.inl @@ -19,7 +19,7 @@ namespace glm ( detail::tvec2 const & v0, detail::tvec2 const & v1, - typename detail::tvec2::value_type const & epsilon + typename detail::tvec2::T const & epsilon ) { return length(cross(detail::tvec3(v0, T(0)), detail::tvec3(v1, T(0)))) < epsilon; @@ -30,7 +30,7 @@ namespace glm ( detail::tvec3 const & v0, detail::tvec3 const & v1, - typename detail::tvec3::value_type const & epsilon + typename detail::tvec3::T const & epsilon ) { return length(cross(v0, v1)) < epsilon; @@ -41,7 +41,7 @@ namespace glm ( detail::tvec4 const & v0, detail::tvec4 const & v1, - typename detail::tvec4::value_type const & epsilon + typename detail::tvec4::T const & epsilon ) { return length(cross(detail::tvec3(v0), detail::tvec3(v1))) < epsilon; @@ -52,7 +52,7 @@ namespace glm ( genType const & v0, genType const & v1, - typename genType::value_type const & epsilon + typename genType::T const & epsilon ) { return abs(dot(v0, v1)) <= max( @@ -155,7 +155,7 @@ namespace glm ( genType const & v0, genType const & v1, - typename genType::value_type const & epsilon + typename genType::T const & epsilon ) { return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); diff --git a/readme.txt b/readme.txt index e07576ac..d18dc8e3 100644 --- a/readme.txt +++ b/readme.txt @@ -53,6 +53,7 @@ GLM 0.9.5.0: 2013-XX-XX - Fixed perspective with zNear == 0 (#71) - Removed l-value swizzle operators - Clean up compiler detection code for unsupported compilers +- Uses C++ casts ================================================================================ GLM 0.9.4.6: 2013-08-XX diff --git a/test/core/core_func_swizzle.cpp b/test/core/core_func_swizzle.cpp index f88fe273..99d9d0d2 100644 --- a/test/core/core_func_swizzle.cpp +++ b/test/core/core_func_swizzle.cpp @@ -63,7 +63,7 @@ int test_vec4_swizzle() glm::vec4 A(1, 2, 3, 4); glm::vec4 B = A.xyzw(); glm::vec4 C(0); - C.xyzw = B.xyzw; + //C.xyzw() = B.xyzw(); float f = glm::dot(C.wzyx(), C.xyzw()); diff --git a/test/gtc/gtc_epsilon.cpp b/test/gtc/gtc_epsilon.cpp index 40610963..2828134c 100644 --- a/test/gtc/gtc_epsilon.cpp +++ b/test/gtc/gtc_epsilon.cpp @@ -47,25 +47,25 @@ int test_equal() { T A(0); - T B = T(0) + glm::epsilon(); + T B = static_cast(0) + glm::epsilon(); Error += glm::epsilonEqual(A, B, glm::epsilon() * T(2)) ? 0 : 1; } { T A(0); - T B = T(0) - glm::epsilon(); + T B = static_cast(0) - glm::epsilon(); Error += glm::epsilonEqual(A, B, glm::epsilon() * T(2)) ? 0 : 1; } { - T A = T(0) + glm::epsilon(); - T B = T(0); + T A = static_cast(0) + glm::epsilon(); + T B = static_cast(0); Error += glm::epsilonEqual(A, B, glm::epsilon() * T(2)) ? 0 : 1; } { - T A = T(0) - glm::epsilon(); - T B = T(0); + T A = static_cast(0) - glm::epsilon(); + T B = static_cast(0); Error += glm::epsilonEqual(A, B, glm::epsilon() * T(2)) ? 0 : 1; }