public boolean isEquals ( Quadrilateral_F64 quad , double tol ) { tol *= tol ; if ( a . distance2 ( quad . a ) > tol ) return false ; if ( b . distance2 ( quad . b ) > tol ) return false ; if ( c . distance2 ( quad . c ) > tol ) return false ; return d . distance2 ( quad . d ) <= tol ; }
Returns true if the two quadrilaterals are equal to each other to within tolerance . Equality is defined by seeing if the distance between two equivalent vertexes is within tolerance .