HologramDepthmap Library
epsilon.h
Go to the documentation of this file.
1 #ifndef __epsilon_h
2 #define __epsilon_h
3 
4 #include "graphics/real.h"
5 
6 namespace graphics {
7 
8 extern real epsilon;
9 extern real user_epsilon;
11 
12 extern real sqrt_epsilon;
13 extern real unset_value;
14 extern real zero_tolerance;
15 extern real angle_tolerance;
16 extern real zero_epsilon;
17 
18 
19 /*|--------------------------------------------------------------------------*/
20 /*| Set user epsilon : Throughout the running program we could use the same */
21 /*| user epsilon defined here. Default user_epsilon is always 1e-8. */
22 /*|--------------------------------------------------------------------------*/
23 void set_u_epsilon(real a);
24 
25 void reset_u_epsilon();
26 
27 
28 void set_zero_epsilon(real a);
29 
30 void reset_zero_epsilon();
31 /*|--------------------------------------------------------------------------*/
32 /*| Approximated version of checking equality : using epsilon */
33 /*|--------------------------------------------------------------------------*/
34 int apx_equal(real x, real y);
35 
36 int apx_equal(real x, real y, real eps);
37 
38 }; // namespace graphics
39 #endif
void set_zero_epsilon(real a)
Definition: epsilon.cpp:31
void reset_u_epsilon()
Definition: epsilon.cpp:27
void reset_zero_epsilon()
Definition: epsilon.cpp:37
real intersection_epsilon
Definition: epsilon.cpp:9
double real
Definition: real.h:4
real user_epsilon
Definition: epsilon.cpp:8
real epsilon
Definition: epsilon.cpp:7
real zero_epsilon
Definition: epsilon.cpp:13
real sqrt_epsilon
Definition: epsilon.cpp:10
int apx_equal(real x, real y)
Definition: epsilon.cpp:45
real angle_tolerance
Definition: epsilon.cpp:14
real zero_tolerance
Definition: epsilon.cpp:12
real unset_value
Definition: epsilon.cpp:11
void set_u_epsilon(real a)
Definition: epsilon.cpp:22