コード例 #1
0
ファイル: FuzzyPixel.cpp プロジェクト: BrandRegard/gnash
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;
}
コード例 #2
0
ファイル: Box.hpp プロジェクト: 4ker/imgAnnotation
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);
}
コード例 #3
0
ファイル: Box.hpp プロジェクト: 4ker/imgAnnotation
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);
}
コード例 #4
0
ファイル: Plane.cpp プロジェクト: KAlO2/Pea
bool Plane::operator ==(const Plane &other) const
{
	return fuzzyEqual(d, other.d) && fuzzyEqual(N, other.N);
}
コード例 #5
0
ファイル: Size.hpp プロジェクト: 4ker/imgAnnotation
inline bool operator!=(const Size<double> &s1, const Size<double> &s2)
{ return !fuzzyEqual(s1.getWidth(), s2.getWidth()) || !fuzzyEqual(s1.getHeight(), s2.getHeight()); }
コード例 #6
0
ファイル: Size.hpp プロジェクト: 4ker/imgAnnotation
inline bool operator==(const Size<float> &s1, const Size<float> &s2)
{ return fuzzyEqual(s1.getWidth(), s2.getWidth()) && fuzzyEqual(s1.getHeight(), s2.getHeight()); }