0.9.6
fast_square_root.hpp
Go to the documentation of this file.
1 
44 #pragma once
45 
46 // Dependency:
47 #include "../common.hpp"
48 #include "../exponential.hpp"
49 #include "../geometric.hpp"
50 
51 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
52 # pragma message("GLM: GLM_GTX_fast_square_root extension included")
53 #endif
54 
55 namespace glm
56 {
59 
63  template <typename genType>
64  GLM_FUNC_DECL genType fastSqrt(genType x);
65 
69  template <typename T, precision P, template <typename, precision> class vecType>
70  GLM_FUNC_DECL vecType<T, P> fastSqrt(vecType<T, P> const & x);
71 
75  template <typename genType>
76  GLM_FUNC_DECL genType fastInverseSqrt(genType x);
77 
81  template <typename T, precision P, template <typename, precision> class vecType>
82  GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x);
83 
87  template <typename genType>
88  GLM_FUNC_DECL genType fastLength(genType x);
89 
93  template <typename T, precision P, template <typename, precision> class vecType>
94  GLM_FUNC_DECL T fastLength(vecType<T, P> const & x);
95 
99  template <typename genType>
100  GLM_FUNC_DECL genType fastDistance(genType x, genType y);
101 
105  template <typename T, precision P, template <typename, precision> class vecType>
106  GLM_FUNC_DECL T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y);
107 
111  template <typename genType>
112  GLM_FUNC_DECL genType fastNormalize(genType const & x);
113 
115 }// namespace glm
116 
117 #include "fast_square_root.inl"
GLM_FUNC_DECL T fastLength(vecType< T, P > const &x)
Faster than the common length function but less accurate.
GLM_FUNC_DECL vecType< T, P > fastSqrt(vecType< T, P > const &x)
Faster than the common sqrt function but less accurate.
GLM_FUNC_DECL T fastDistance(vecType< T, P > const &x, vecType< T, P > const &y)
Faster than the common distance function but less accurate.
GLM_FUNC_DECL genType fastNormalize(genType const &x)
Faster than the common normalize function but less accurate.
Definition: _noise.hpp:39
GLM_FUNC_DECL vecType< T, P > fastInverseSqrt(vecType< T, P > const &x)
Faster than the common inversesqrt function but less accurate.