|
@@ -79,15 +79,13 @@ namespace oxygine
|
|
|
inline float sqrt(int s)
|
|
inline float sqrt(int s)
|
|
|
{return ::sqrtf((float)s);}
|
|
{return ::sqrtf((float)s);}
|
|
|
|
|
|
|
|
- inline bool equivalent(double a, double b)
|
|
|
|
|
|
|
+ inline bool equivalent(double a, double b, const double eps = 10e-8)
|
|
|
{
|
|
{
|
|
|
- const double eps = 10e-8;
|
|
|
|
|
return ((a < b + eps) && (a > b - eps)) ? true : false;
|
|
return ((a < b + eps) && (a > b - eps)) ? true : false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- inline bool equivalent(float a, float b)
|
|
|
|
|
|
|
+ inline bool equivalent(float a, float b, const float eps = (float)(10e-6))
|
|
|
{
|
|
{
|
|
|
- const float eps = (float)(10e-6);
|
|
|
|
|
return ((a < b + eps) && (a > b - eps)) ? true : false;
|
|
return ((a < b + eps) && (a > b - eps)) ? true : false;
|
|
|
}
|
|
}
|
|
|
|
|
|