GLM 0.9.5

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

- File List

gtc/ulp.hpp
Go to the documentation of this file.
1
39 #ifndef GLM_GTC_ulp
40 #define GLM_GTC_ulp
41
42 // Dependencies
43 #include "../detail/setup.hpp"
44 #include "../detail/precision.hpp"
45 #include "../detail/type_int.hpp"
46
47 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 # pragma message("GLM: GLM_GTC_ulp extension included")
49 #endif
50
51 namespace glm
52 {
55
58 template <typename genType>
59 GLM_FUNC_DECL genType next_float(genType const & x);
60
63 template <typename genType>
64 GLM_FUNC_DECL genType prev_float(genType const & x);
65
68 template <typename genType>
69 GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);
70
73 template <typename genType>
74 GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);
75
78 template <typename T>
79 GLM_FUNC_DECL uint float_distance(T const & x, T const & y);
80
83 template<typename T, template<typename> class vecType>
84 GLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
85
87 }// namespace glm
88
89 #include "ulp.inl"
90
91 #endif//GLM_GTC_ulp
92
glm::next_float
GLM_FUNC_DECL genType next_float(genType const &x)
Return the next ULP value(s) after the input value(s).
glm::uint
unsigned int uint
Unsigned integer type.
Definition: type_int.hpp:171
glm::float_distance
GLM_FUNC_DECL uint float_distance(T const &x, T const &y)
Return the distance in the number of ULP between 2 scalars.
glm::prev_float
GLM_FUNC_DECL genType prev_float(genType const &x)
Return the previous ULP value(s) before the input value(s).