#ifndef CMP_H_INCLUDED
#define CMP_H_INCLUDED 1

// Copyright (C) 2005 Zbynek Winkler, zw at robotika cz
// Licensed to the public under the terms of the GNU GPL 2

inline bool eq(const double & a, const double & b, const double eps = 1e-4) 
{
	double diff = a - b;
	return diff <= eps && diff >= -eps;
}

inline bool lt(const double & a, const double & b, const double eps = 1e-4)
{
	return a + eps < b;
}

inline bool gt(const double & a, const double & b, const double eps = 1e-4)
{
	return a - eps > b;
}


#endif


