SourceXtractorPlusPlus  0.12
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsClose.h
Go to the documentation of this file.
1 
23 #ifndef SEUTILS_ISCLOSE_H
24 #define SEUTILS_ISCLOSE_H
25 
26 namespace SourceXtractor {
27 
28 bool isClose(double a, double b, double atol = 1e-8, double rtol = 1e-5) {
29  return std::abs(a - b) <= (atol + rtol * std::abs(b));
30 }
31 
32 } // end SourceXtractor
33 
34 #endif // SEUTILS_ISCLOSE_H
T atol(T...args)
bool isClose(double a, double b, double atol=1e-8, double rtol=1e-5)
Definition: IsClose.h:28