From 2877f4eda3d1b0c7431039e3142ecf1a282a34b1 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Tue, 21 Aug 2018 20:40:38 +0500 Subject: Update glm to 0.9.9.0 --- external/include/glm/gtx/component_wise.inl | 78 ++++++++++++++--------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'external/include/glm/gtx/component_wise.inl') diff --git a/external/include/glm/gtx/component_wise.inl b/external/include/glm/gtx/component_wise.inl index add3969..8ca0ca9 100644 --- a/external/include/glm/gtx/component_wise.inl +++ b/external/include/glm/gtx/component_wise.inl @@ -6,92 +6,92 @@ namespace glm{ namespace detail { - template class vecType, bool isInteger, bool signedType> + template struct compute_compNormalize {}; - template class vecType> - struct compute_compNormalize + template + struct compute_compNormalize { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { floatType const Min = static_cast(std::numeric_limits::min()); floatType const Max = static_cast(std::numeric_limits::max()); - return (vecType(v) - Min) / (Max - Min) * static_cast(2) - static_cast(1); + return (vec(v) - Min) / (Max - Min) * static_cast(2) - static_cast(1); } }; - template class vecType> - struct compute_compNormalize + template + struct compute_compNormalize { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { - return vecType(v) / static_cast(std::numeric_limits::max()); + return vec(v) / static_cast(std::numeric_limits::max()); } }; - template class vecType> - struct compute_compNormalize + template + struct compute_compNormalize { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { return v; } }; - template class vecType, bool isInteger, bool signedType> + template struct compute_compScale {}; - template class vecType> - struct compute_compScale + template + struct compute_compScale { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { floatType const Max = static_cast(std::numeric_limits::max()) + static_cast(0.5); - vecType const Scaled(v * Max); - vecType const Result(Scaled - static_cast(0.5)); + vec const Scaled(v * Max); + vec const Result(Scaled - static_cast(0.5)); return Result; } }; - template class vecType> - struct compute_compScale + template + struct compute_compScale { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { - return vecType(vecType(v) * static_cast(std::numeric_limits::max())); + return vec(vec(v) * static_cast(std::numeric_limits::max())); } }; - template class vecType> - struct compute_compScale + template + struct compute_compScale { - GLM_FUNC_QUALIFIER static vecType call(vecType const & v) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { return v; } }; }//namespace detail - template class vecType> - GLM_FUNC_QUALIFIER vecType compNormalize(vecType const & v) + template + GLM_FUNC_QUALIFIER vec compNormalize(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'compNormalize' accepts only floating-point types for 'floatType' template parameter"); - return detail::compute_compNormalize::is_integer, std::numeric_limits::is_signed>::call(v); + return detail::compute_compNormalize::is_integer, std::numeric_limits::is_signed>::call(v); } - template class vecType> - GLM_FUNC_QUALIFIER vecType compScale(vecType const & v) + template + GLM_FUNC_QUALIFIER vec compScale(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'compScale' accepts only floating-point types for 'floatType' template parameter"); - return detail::compute_compScale::is_integer, std::numeric_limits::is_signed>::call(v); + return detail::compute_compScale::is_integer, std::numeric_limits::is_signed>::call(v); } - template class vecType> - GLM_FUNC_QUALIFIER T compAdd(vecType const & v) + template + GLM_FUNC_QUALIFIER T compAdd(vec const& v) { T Result(0); for(length_t i = 0, n = v.length(); i < n; ++i) @@ -99,8 +99,8 @@ namespace detail return Result; } - template class vecType> - GLM_FUNC_QUALIFIER T compMul(vecType const & v) + template + GLM_FUNC_QUALIFIER T compMul(vec const& v) { T Result(1); for(length_t i = 0, n = v.length(); i < n; ++i) @@ -108,8 +108,8 @@ namespace detail return Result; } - template class vecType> - GLM_FUNC_QUALIFIER T compMin(vecType const & v) + template + GLM_FUNC_QUALIFIER T compMin(vec const& v) { T Result(v[0]); for(length_t i = 1, n = v.length(); i < n; ++i) @@ -117,8 +117,8 @@ namespace detail return Result; } - template class vecType> - GLM_FUNC_QUALIFIER T compMax(vecType const & v) + template + GLM_FUNC_QUALIFIER T compMax(vec const& v) { T Result(v[0]); for(length_t i = 1, n = v.length(); i < n; ++i) -- cgit v1.2.3