|
@@ -39,6 +39,7 @@
|
|
|
|
|
|
|
|
// Dependency:
|
|
// Dependency:
|
|
|
#include "../glm.hpp"
|
|
#include "../glm.hpp"
|
|
|
|
|
+#include "../gtc/constants.hpp"
|
|
|
|
|
|
|
|
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
|
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
|
|
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
|
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
|
@@ -49,45 +50,48 @@ namespace glm
|
|
|
/// @addtogroup gtx_fast_trigonometry
|
|
/// @addtogroup gtx_fast_trigonometry
|
|
|
/// @{
|
|
/// @{
|
|
|
|
|
|
|
|
- //! Faster than the common sin function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Wrap an angle to [0 2pi[
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
|
|
+ GLM_FUNC_DECL T wrapAngle(T angle);
|
|
|
|
|
+
|
|
|
|
|
+ /// Faster than the common sin function but less accurate.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
+ template <typename T>
|
|
|
GLM_FUNC_DECL T fastSin(T angle);
|
|
GLM_FUNC_DECL T fastSin(T angle);
|
|
|
|
|
|
|
|
- //! Faster than the common cos function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common cos function but less accurate.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastCos(T angle);
|
|
GLM_FUNC_DECL T fastCos(T angle);
|
|
|
|
|
|
|
|
- //! Faster than the common tan function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common tan function but less accurate.
|
|
|
|
|
+ /// Defined between -2pi and 2pi.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastTan(T angle);
|
|
GLM_FUNC_DECL T fastTan(T angle);
|
|
|
|
|
|
|
|
- //! Faster than the common asin function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common asin function but less accurate.
|
|
|
|
|
+ /// Defined between -2pi and 2pi.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastAsin(T angle);
|
|
GLM_FUNC_DECL T fastAsin(T angle);
|
|
|
|
|
|
|
|
- //! Faster than the common acos function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common acos function but less accurate.
|
|
|
|
|
+ /// Defined between -2pi and 2pi.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastAcos(T angle);
|
|
GLM_FUNC_DECL T fastAcos(T angle);
|
|
|
|
|
|
|
|
- //! Faster than the common atan function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common atan function but less accurate.
|
|
|
|
|
+ /// Defined between -2pi and 2pi.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastAtan(T y, T x);
|
|
GLM_FUNC_DECL T fastAtan(T y, T x);
|
|
|
|
|
|
|
|
- //! Faster than the common atan function but less accurate.
|
|
|
|
|
- //! Defined between -2pi and 2pi.
|
|
|
|
|
- //! From GLM_GTX_fast_trigonometry extension.
|
|
|
|
|
|
|
+ /// Faster than the common atan function but less accurate.
|
|
|
|
|
+ /// Defined between -2pi and 2pi.
|
|
|
|
|
+ /// From GLM_GTX_fast_trigonometry extension.
|
|
|
template <typename T>
|
|
template <typename T>
|
|
|
GLM_FUNC_DECL T fastAtan(T angle);
|
|
GLM_FUNC_DECL T fastAtan(T angle);
|
|
|
|
|
|