GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

- File List

optimum_pow.hpp
Go to the documentation of this file.
1
38 #ifndef GLM_GTX_optimum_pow
39 #define GLM_GTX_optimum_pow
40
41 // Dependency:
42 #include "../glm.hpp"
43
44 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
45 # pragma message("GLM: GLM_GTX_optimum_pow extension included")
46 #endif
47
48 namespace glm{
49 namespace gtx
50 {
53
56 template <typename genType>
57 genType pow2(const genType& x);
58
61 template <typename genType>
62 genType pow3(const genType& x);
63
66 template <typename genType>
67 genType pow4(const genType& x);
68
71 bool powOfTwo(int num);
72
75 template <precision P>
76 detail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x);
77
80 template <precision P>
81 detail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x);
82
85 template <precision P>
86 detail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x);
87
89 }//namespace gtx
90 }//namespace glm
91
92 #include "optimum_pow.inl"
93
94 #endif//GLM_GTX_optimum_pow
glm::gtx::pow3
genType pow3(const genType &x)
Returns x raised to the power of 3.
glm::gtx::pow4
genType pow4(const genType &x)
Returns x raised to the power of 4.
glm::gtx::pow2
genType pow2(const genType &x)
Returns x raised to the power of 2.
glm::gtx::powOfTwo
bool powOfTwo(int num)
Checks if the parameter is a power of 2 number.