1/// @ref gtx_normalize_dot 2/// @file glm/gtx/normalize_dot.inl 3 4namespace glm 5{ 6 template <typename T, precision P, template <typename, precision> class vecType> 7 GLM_FUNC_QUALIFIER T normalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) 8 { 9 return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 10 } 11 12 template <typename T, precision P, template <typename, precision> class vecType> 13 GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType<T, P> const & x, vecType<T, P> const & y) 14 { 15 return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 16 } 17}//namespace glm 18