Ejemplo n.º 1
0
bool
FuzzyPixel::operator==(const FuzzyPixel& o) const
{
	// Intolerant FuzzyPixels never succeed in comparison
	if ( _tol < 0 || o._tol < 0 ) return false;

	int tol=std::max(_tol, o._tol);
	if ( ! fuzzyEqual(_col.m_r, o._col.m_r, tol) ) return false;
	if ( ! fuzzyEqual(_col.m_g, o._col.m_g, tol) ) return false;
	if ( ! fuzzyEqual(_col.m_b, o._col.m_b, tol) ) return false;
	if ( ! fuzzyEqual(_col.m_a, o._col.m_a, tol) ) return false;
	return true;
}
Ejemplo n.º 2
0
inline bool operator!=(const Box<float> &r1, const Box<float> &r2)
{
	return !fuzzyEqual(r1.xp, r2.xp) || !fuzzyEqual(r1.yp, r2.yp)
		   || !fuzzyEqual(r1.w, r2.w) || !fuzzyEqual(r1.h, r2.h);
}
Ejemplo n.º 3
0
inline bool operator==(const Box<float> &r1, const Box<float> &r2)
{
	return fuzzyEqual(r1.xp, r2.xp) && fuzzyEqual(r1.yp, r2.yp)
		   && fuzzyEqual(r1.w, r2.w) && fuzzyEqual(r1.h, r2.h);
}
Ejemplo n.º 4
0
Archivo: Plane.cpp Proyecto: KAlO2/Pea
bool Plane::operator ==(const Plane &other) const
{
	return fuzzyEqual(d, other.d) && fuzzyEqual(N, other.N);
}
Ejemplo n.º 5
0
inline bool operator!=(const Size<double> &s1, const Size<double> &s2)
{ return !fuzzyEqual(s1.getWidth(), s2.getWidth()) || !fuzzyEqual(s1.getHeight(), s2.getHeight()); }
Ejemplo n.º 6
0
inline bool operator==(const Size<float> &s1, const Size<float> &s2)
{ return fuzzyEqual(s1.getWidth(), s2.getWidth()) && fuzzyEqual(s1.getHeight(), s2.getHeight()); }