diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-21 17:40:38 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-08-21 17:40:38 +0200 |
commit | 2877f4eda3d1b0c7431039e3142ecf1a282a34b1 (patch) | |
tree | 58ad35e27ab2a3b8955f5adbf28f296670681ffc /external/include/glm/gtx/fast_square_root.hpp | |
parent | Smooth sun movement (diff) | |
download | AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.gz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.bz2 AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.lz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.xz AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.tar.zst AltCraft-2877f4eda3d1b0c7431039e3142ecf1a282a34b1.zip |
Diffstat (limited to 'external/include/glm/gtx/fast_square_root.hpp')
-rw-r--r-- | external/include/glm/gtx/fast_square_root.hpp | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/external/include/glm/gtx/fast_square_root.hpp b/external/include/glm/gtx/fast_square_root.hpp index 35aa7f3..9e15cb0 100644 --- a/external/include/glm/gtx/fast_square_root.hpp +++ b/external/include/glm/gtx/fast_square_root.hpp @@ -6,11 +6,11 @@ /// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root /// @ingroup gtx /// -/// @brief Fast but less accurate implementations of square root based functions. -/// - Sqrt optimisation based on Newton's method, -/// www.gamedev.net/community/forums/topic.asp?topic id=139956 +/// Include <glm/gtx/fast_square_root.hpp> to use the features of this extension. /// -/// <glm/gtx/fast_square_root.hpp> need to be included to use these functionalities. +/// Fast but less accurate implementations of square root based functions. +/// - Sqrt optimisation based on Newton's method, +/// www.gamedev.net/community/forums/topic.asp?topic id=139956 #pragma once @@ -19,6 +19,10 @@ #include "../exponential.hpp" #include "../geometric.hpp" +#ifndef GLM_ENABLE_EXPERIMENTAL +# 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." +#endif + #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_square_root extension included") #endif @@ -31,56 +35,56 @@ namespace glm /// Faster than the common sqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename genType> + template<typename genType> GLM_FUNC_DECL genType fastSqrt(genType x); /// Faster than the common sqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_DECL vecType<T, P> fastSqrt(vecType<T, P> const & x); + template<length_t L, typename T, qualifier Q> + GLM_FUNC_DECL vec<L, T, Q> fastSqrt(vec<L, T, Q> const& x); /// Faster than the common inversesqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename genType> + template<typename genType> GLM_FUNC_DECL genType fastInverseSqrt(genType x); /// Faster than the common inversesqrt function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x); + template<length_t L, typename T, qualifier Q> + GLM_FUNC_DECL vec<L, T, Q> fastInverseSqrt(vec<L, T, Q> const& x); /// Faster than the common length function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename genType> + template<typename genType> GLM_FUNC_DECL genType fastLength(genType x); /// Faster than the common length function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_DECL T fastLength(vecType<T, P> const & x); + template<length_t L, typename T, qualifier Q> + GLM_FUNC_DECL T fastLength(vec<L, T, Q> const& x); /// Faster than the common distance function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename genType> + template<typename genType> GLM_FUNC_DECL genType fastDistance(genType x, genType y); /// Faster than the common distance function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_DECL T fastDistance(vecType<T, P> const & x, vecType<T, P> const & y); + template<length_t L, typename T, qualifier Q> + GLM_FUNC_DECL T fastDistance(vec<L, T, Q> const& x, vec<L, T, Q> const& y); /// Faster than the common normalize function but less accurate. /// /// @see gtx_fast_square_root extension. - template <typename genType> - GLM_FUNC_DECL genType fastNormalize(genType const & x); + template<typename genType> + GLM_FUNC_DECL genType fastNormalize(genType const& x); /// @} }// namespace glm |