18 #ifndef __H__OCULAR_ENGINE_MATH_EQUALITY__H__
19 #define __H__OCULAR_ENGINE_MATH_EQUALITY__H__
21 #include "MathCommon.hpp"
47 static bool IsEqual(
double const a,
double const b,
double epsilon = EPSILON_DOUBLE)
50 return std::abs(a - b) < epsilon;
57 static bool IsEqual(
float const a,
float const b,
float epsilon = EPSILON_FLOAT)
60 return std::abs(a - b) < epsilon;
67 static bool IsEqual(T
const a, T
const b)
73 static bool IsZero(T
const a)
75 return IsEqual<T>(a,
static_cast<T
>(0));
79 static bool IsOne(T
const a)
81 return IsEqual<T>(a,
static_cast<T
>(1));
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70