1 /// @ref gtx_fast_trigonometry 2 /// @file glm/gtx/fast_trigonometry.hpp 3 /// 4 /// @see core (dependence) 5 /// 6 /// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry 7 /// @ingroup gtx 8 /// 9 /// @brief Fast but less accurate implementations of trigonometric functions. 10 /// 11 /// <glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities. 12 13 #pragma once 14 15 // Dependency: 16 #include "../gtc/constants.hpp" 17 18 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 # pragma message("GLM: GLM_GTX_fast_trigonometry extension included") 20 #endif 21 22 namespace glm 23 { 24 /// @addtogroup gtx_fast_trigonometry 25 /// @{ 26 27 /// Wrap an angle to [0 2pi[ 28 /// From GLM_GTX_fast_trigonometry extension. 29 template <typename T> 30 GLM_FUNC_DECL T wrapAngle(T angle); 31 32 /// Faster than the common sin function but less accurate. 33 /// From GLM_GTX_fast_trigonometry extension. 34 template <typename T> 35 GLM_FUNC_DECL T fastSin(T angle); 36 37 /// Faster than the common cos function but less accurate. 38 /// From GLM_GTX_fast_trigonometry extension. 39 template <typename T> 40 GLM_FUNC_DECL T fastCos(T angle); 41 42 /// Faster than the common tan function but less accurate. 43 /// Defined between -2pi and 2pi. 44 /// From GLM_GTX_fast_trigonometry extension. 45 template <typename T> 46 GLM_FUNC_DECL T fastTan(T angle); 47 48 /// Faster than the common asin function but less accurate. 49 /// Defined between -2pi and 2pi. 50 /// From GLM_GTX_fast_trigonometry extension. 51 template <typename T> 52 GLM_FUNC_DECL T fastAsin(T angle); 53 54 /// Faster than the common acos function but less accurate. 55 /// Defined between -2pi and 2pi. 56 /// From GLM_GTX_fast_trigonometry extension. 57 template <typename T> 58 GLM_FUNC_DECL T fastAcos(T angle); 59 60 /// Faster than the common atan function but less accurate. 61 /// Defined between -2pi and 2pi. 62 /// From GLM_GTX_fast_trigonometry extension. 63 template <typename T> 64 GLM_FUNC_DECL T fastAtan(T y, T x); 65 66 /// Faster than the common atan function but less accurate. 67 /// Defined between -2pi and 2pi. 68 /// From GLM_GTX_fast_trigonometry extension. 69 template <typename T> 70 GLM_FUNC_DECL T fastAtan(T angle); 71 72 /// @} 73 }//namespace glm 74 75 #include "fast_trigonometry.inl" 76