18 #include "../common.hpp"
19 #include "../exponential.hpp"
20 #include "../geometric.hpp"
22 #ifndef GLM_ENABLE_EXPERIMENTAL
23 # error "GLM: GLM_GTX_fast_square_root is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
26 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
27 # pragma message("GLM: GLM_GTX_fast_square_root extension included")
38 template<
typename genType>
39 GLM_FUNC_DECL genType
fastSqrt(genType x);
44 template<length_t L,
typename T, qualifier P>
45 GLM_FUNC_DECL vec<L, T, P>
fastSqrt(vec<L, T, P>
const & x);
50 template<
typename genType>
56 template<length_t L,
typename T, qualifier P>
62 template<
typename genType>
68 template<length_t L,
typename T, qualifier P>
69 GLM_FUNC_DECL T
fastLength(vec<L, T, P>
const & x);
74 template<
typename genType>
75 GLM_FUNC_DECL genType
fastDistance(genType x, genType y);
80 template<length_t L,
typename T, qualifier P>
81 GLM_FUNC_DECL T
fastDistance(vec<L, T, P>
const & x, vec<L, T, P>
const & y);
86 template<
typename genType>
92 #include "fast_square_root.inl"
GLM_FUNC_DECL vec< L, T, P > fastInverseSqrt(vec< L, T, P > const &x)
Faster than the common inversesqrt function but less accurate.
GLM_FUNC_DECL genType fastNormalize(genType const &x)
Faster than the common normalize function but less accurate.
GLM_FUNC_DECL T fastDistance(vec< L, T, P > const &x, vec< L, T, P > const &y)
Faster than the common distance function but less accurate.
GLM_FUNC_DECL T fastLength(vec< L, T, P > const &x)
Faster than the common length function but less accurate.
GLM_FUNC_DECL vec< L, T, P > fastSqrt(vec< L, T, P > const &x)
Faster than the common sqrt function but less accurate.