1.0.0 API documentation
Loading...
Searching...
No Matches
vector_ulp.hpp
Go to the documentation of this file.
1
16
17#pragma once
18
19// Dependencies
20#include "../ext/scalar_ulp.hpp"
21
22#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23# pragma message("GLM: GLM_EXT_vector_ulp extension included")
24#endif
25
26namespace glm
27{
30
38 template<length_t L, typename T, qualifier Q>
39 GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x);
40
48 template<length_t L, typename T, qualifier Q>
49 GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, int ULPs);
50
58 template<length_t L, typename T, qualifier Q>
59 GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
60
68 template<length_t L, typename T, qualifier Q>
69 GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x);
70
78 template<length_t L, typename T, qualifier Q>
79 GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, int ULPs);
80
88 template<length_t L, typename T, qualifier Q>
89 GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
90
97 template<length_t L, typename T, qualifier Q>
98 GLM_FUNC_DECL vec<L, int, Q> floatDistance(vec<L, float, Q> const& x, vec<L, float, Q> const& y);
99
106 template<length_t L, typename T, qualifier Q>
107 GLM_FUNC_DECL vec<L, int64, Q> floatDistance(vec<L, double, Q> const& x, vec<L, double, Q> const& y);
108
110}//namespace glm
111
112#include "vector_ulp.inl"
GLM_FUNC_DECL int floatDistance(float x, float y)
Return the distance in the number of ULP between 2 single-precision floating-point scalars.
GLM_FUNC_DECL genType prevFloat(genType x)
Return the previous ULP value(s) before the input value(s).
GLM_FUNC_DECL genType nextFloat(genType x)
Return the next ULP value(s) after the input value(s).