Package com.github.davidmoten.rtree.geometry

Examples of com.github.davidmoten.rtree.geometry.Rectangle.intersects()


    @Test
    public void testIntersects() {
        Rectangle a = rectangle(14, 14, 86, 37);
        Rectangle b = rectangle(13, 23, 50, 80);
        assertTrue(a.intersects(b));
        assertTrue(b.intersects(a));
    }

    @Test
    public void testIntersectsNoRectangleContainsCornerOfAnother() {
        Rectangle a = rectangle(10, 10, 50, 50);
View Full Code Here


    @Test
    public void testIntersectsNoRectangleContainsCornerOfAnother() {
        Rectangle a = rectangle(10, 10, 50, 50);
        Rectangle b = rectangle(28.0, 4.0, 34.0, 85.0);
        assertTrue(a.intersects(b));
        assertTrue(b.intersects(a));
    }

    @Test
    public void testIntersectsOneRectangleContainsTheOther() {
        Rectangle a = rectangle(10, 10, 50, 50);
View Full Code Here

    @Test
    public void testIntersectsOneRectangleContainsTheOther() {
        Rectangle a = rectangle(10, 10, 50, 50);
        Rectangle b = rectangle(20, 20, 40, 40);
        assertTrue(a.intersects(b));
        assertTrue(b.intersects(a));
    }
   
    @Test
    public void testContains() {
        Rectangle r = rectangle(10,20,30,40);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.