/// <summary> /// This method tests if the edges of this bounding box touches the edges of the <code>rec</code> bounding box. /// <c><![CDATA[ /// +-+----+---+ /// | | | | /// | +----+ | /// | | /// +----------+ /// ]]></c> /// </summary> /// <param name="rec">Bounding box.</param> /// <param name="epsilon">Epsilon error.</param> /// <returns>true if both bounding box touch.</returns> public bool Touch(BoundingBox2d rec, double epsilon = MathUtils.EPSILON) { return(RangeUtils.Touch(this.XMin, this.XMax, rec.XMin, rec.XMax, epsilon) || RangeUtils.Touch(this.YMin, this.YMax, rec.YMin, rec.YMax, epsilon)); }