diff options
Diffstat (limited to 'ext/dsent/libutil/MathUtil.h')
-rw-r--r-- | ext/dsent/libutil/MathUtil.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/dsent/libutil/MathUtil.h b/ext/dsent/libutil/MathUtil.h new file mode 100644 index 000000000..1f3341ee1 --- /dev/null +++ b/ext/dsent/libutil/MathUtil.h @@ -0,0 +1,21 @@ +#ifndef __MATH_H__ +#define __MATH_H__ + +#include <cmath> + +namespace LibUtil +{ + class Math + { + public: + static const double epsilon; + + static inline bool isEqual(double value1_, double value2_) + { + return (std::fabs(value1_ - value2_) < epsilon); + } + }; +} // namespace LibUtil + +#endif // __MATH_H__ + |