diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index 26fa514f..806c4ba4 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -83,7 +83,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType pow(vecType const & base, vecType const & exponent) { - return detail::functor2::call(::std::pow, base, exponent); + return detail::functor2::call(pow, base, exponent); } // exp @@ -91,7 +91,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType exp(vecType const & x) { - return detail::functor1::call(::std::exp, x); + return detail::functor1::call(exp, x); } // log @@ -99,7 +99,7 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType log(vecType const & x) { - return detail::functor1::call(::std::log, x); + return detail::functor1::call(log, x); } //exp2, ln2 = 0.69314718055994530941723212145818f diff --git a/glm/gtc/reciprocal.inl b/glm/gtc/reciprocal.inl index 3c661b5e..587f42a2 100644 --- a/glm/gtc/reciprocal.inl +++ b/glm/gtc/reciprocal.inl @@ -33,80 +33,82 @@ namespace glm { // sec template - GLM_FUNC_QUALIFIER genType sec - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType sec(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sec' only accept floating-point values"); - return genType(1) / glm::cos(angle); } - VECTORIZE_VEC(sec) + template class vecType> + GLM_FUNC_QUALIFIER vecType sec(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sec' only accept floating-point inputs"); + return detail::functor1::call(sec, x); + } // csc template - GLM_FUNC_QUALIFIER genType csc - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType csc(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csc' only accept floating-point values"); - return genType(1) / glm::sin(angle); } - VECTORIZE_VEC(csc) + template class vecType> + GLM_FUNC_QUALIFIER vecType csc(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csc' only accept floating-point inputs"); + return detail::functor1::call(csc, x); + } // cot template - GLM_FUNC_QUALIFIER genType cot - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType cot(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cot' only accept floating-point values"); - return genType(1) / glm::tan(angle); } - VECTORIZE_VEC(cot) + template class vecType> + GLM_FUNC_QUALIFIER vecType cot(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cot' only accept floating-point inputs"); + return detail::functor1::call(cot, x); + } // asec template - GLM_FUNC_QUALIFIER genType asec - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType asec(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asec' only accept floating-point values"); - return acos(genType(1) / x); } - VECTORIZE_VEC(asec) + template class vecType> + GLM_FUNC_QUALIFIER vecType asec(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asec' only accept floating-point inputs"); + return detail::functor1::call(asec, x); + } // acsc template - GLM_FUNC_QUALIFIER genType acsc - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType acsc(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsc' only accept floating-point values"); - return asin(genType(1) / x); } - VECTORIZE_VEC(acsc) + template class vecType> + GLM_FUNC_QUALIFIER vecType acsc(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsc' only accept floating-point inputs"); + return detail::functor1::call(acsc, x); + } // acot template - GLM_FUNC_QUALIFIER genType acot - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType acot(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acot' only accept floating-point values"); @@ -114,89 +116,100 @@ namespace glm return pi_over_2 - atan(x); } - VECTORIZE_VEC(acot) + template class vecType> + GLM_FUNC_QUALIFIER vecType acot(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acot' only accept floating-point inputs"); + return detail::functor1::call(acot, x); + } // sech template - GLM_FUNC_QUALIFIER genType sech - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType sech(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sech' only accept floating-point values"); - return genType(1) / glm::cosh(angle); } - VECTORIZE_VEC(sech) + template class vecType> + GLM_FUNC_QUALIFIER vecType sech(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sech' only accept floating-point inputs"); + return detail::functor1::call(sech, x); + } // csch template - GLM_FUNC_QUALIFIER genType csch - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType csch(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csch' only accept floating-point values"); - return genType(1) / glm::sinh(angle); } - VECTORIZE_VEC(csch) + template class vecType> + GLM_FUNC_QUALIFIER vecType csch(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csch' only accept floating-point inputs"); + return detail::functor1::call(csch, x); + } // coth template - GLM_FUNC_QUALIFIER genType coth - ( - genType const & angle - ) + GLM_FUNC_QUALIFIER genType coth(genType angle) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'coth' only accept floating-point values"); - return glm::cosh(angle) / glm::sinh(angle); } - VECTORIZE_VEC(coth) + template class vecType> + GLM_FUNC_QUALIFIER vecType coth(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'coth' only accept floating-point inputs"); + return detail::functor1::call(coth, x); + } // asech template - GLM_FUNC_QUALIFIER genType asech - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType asech(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asech' only accept floating-point values"); - return acosh(genType(1) / x); } - VECTORIZE_VEC(asech) + template class vecType> + GLM_FUNC_QUALIFIER vecType asech(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asech' only accept floating-point inputs"); + return detail::functor1::call(asech, x); + } // acsch template - GLM_FUNC_QUALIFIER genType acsch - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType acsch(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsch' only accept floating-point values"); - - return asinh(genType(1) / x); + return acsch(genType(1) / x); } - VECTORIZE_VEC(acsch) + template class vecType> + GLM_FUNC_QUALIFIER vecType acsch(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsch' only accept floating-point inputs"); + return detail::functor1::call(acsch, x); + } // acoth template - GLM_FUNC_QUALIFIER genType acoth - ( - genType const & x - ) + GLM_FUNC_QUALIFIER genType acoth(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acoth' only accept floating-point values"); - return atanh(genType(1) / x); } - VECTORIZE_VEC(acoth) + template class vecType> + GLM_FUNC_QUALIFIER vecType acoth(vecType const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acoth' only accept floating-point inputs"); + return detail::functor1::call(acoth, x); + } }//namespace glm