1.0.0 API documentation
Loading...
Searching...
No Matches
scalar_ulp.hpp
Go to the documentation of this file.
1
15
16#pragma once
17
18// Dependencies
19#include "../ext/scalar_int_sized.hpp"
20#include "../common.hpp"
21#include "../detail/qualifier.hpp"
22
23#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24# pragma message("GLM: GLM_EXT_scalar_ulp extension included")
25#endif
26
27namespace glm
28{
31
37 template<typename genType>
38 GLM_FUNC_DECL genType nextFloat(genType x);
39
45 template<typename genType>
46 GLM_FUNC_DECL genType prevFloat(genType x);
47
53 template<typename genType>
54 GLM_FUNC_DECL genType nextFloat(genType x, int ULPs);
55
61 template<typename genType>
62 GLM_FUNC_DECL genType prevFloat(genType x, int ULPs);
63
67 GLM_FUNC_DECL int floatDistance(float x, float y);
68
72 GLM_FUNC_DECL int64 floatDistance(double x, double y);
73
75}//namespace glm
76
77#include "scalar_ulp.inl"
detail::int64 int64
64 bit signed integer type.
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).