master
ブランチ master
ShaderPlayground / deps / glm / glm / gtx / fast_trigonometry.hpp
2.3 KB、79行 生 Blame 履歴
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/// Include <glm/gtx/fast_trigonometry.hpp> to use the features of this extension.
10///
11/// Fast but less accurate implementations of trigonometric functions.
12
13#pragma once
14
15// Dependency:
16#include "../gtc/constants.hpp"
17
18#ifndef GLM_ENABLE_EXPERIMENTAL
19# error "GLM: GLM_GTX_fast_trigonometry 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."
20#endif
21
22#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
24#endif
25
26namespace glm
27{
28 /// @addtogroup gtx_fast_trigonometry
29 /// @{
30
31 /// Wrap an angle to [0 2pi[
32 /// From GLM_GTX_fast_trigonometry extension.
33 template<typename T>
34 GLM_FUNC_DECL T wrapAngle(T angle);
35
36 /// Faster than the common sin function but less accurate.
37 /// From GLM_GTX_fast_trigonometry extension.
38 template<typename T>
39 GLM_FUNC_DECL T fastSin(T angle);
40
41 /// Faster than the common cos function but less accurate.
42 /// From GLM_GTX_fast_trigonometry extension.
43 template<typename T>
44 GLM_FUNC_DECL T fastCos(T angle);
45
46 /// Faster than the common tan function but less accurate.
47 /// Defined between -2pi and 2pi.
48 /// From GLM_GTX_fast_trigonometry extension.
49 template<typename T>
50 GLM_FUNC_DECL T fastTan(T angle);
51
52 /// Faster than the common asin function but less accurate.
53 /// Defined between -2pi and 2pi.
54 /// From GLM_GTX_fast_trigonometry extension.
55 template<typename T>
56 GLM_FUNC_DECL T fastAsin(T angle);
57
58 /// Faster than the common acos function but less accurate.
59 /// Defined between -2pi and 2pi.
60 /// From GLM_GTX_fast_trigonometry extension.
61 template<typename T>
62 GLM_FUNC_DECL T fastAcos(T angle);
63
64 /// Faster than the common atan function but less accurate.
65 /// Defined between -2pi and 2pi.
66 /// From GLM_GTX_fast_trigonometry extension.
67 template<typename T>
68 GLM_FUNC_DECL T fastAtan(T y, T x);
69
70 /// Faster than the common atan function but less accurate.
71 /// Defined between -2pi and 2pi.
72 /// From GLM_GTX_fast_trigonometry extension.
73 template<typename T>
74 GLM_FUNC_DECL T fastAtan(T angle);
75
76 /// @}
77}//namespace glm
78
79#include "fast_trigonometry.inl"