Search in sources :

Example 1 with RectDouble1D

use of jcog.tree.rtree.rect.RectDouble1D in project narchy by automenta.

the class Rect1DTest method centroidTest.

@Test
public void centroidTest() {
    RectDouble1D rect = new RectDouble1D.DefaultRect1D(0, 4);
    HyperPoint centroid = rect.center();
    double x = centroid.coord(0);
    assertTrue(x == 2.0d, "Bad X-coord of centroid - expected " + 2.0 + " but was " + x);
}
Also used : RectDouble1D(jcog.tree.rtree.rect.RectDouble1D) Test(org.junit.jupiter.api.Test)

Aggregations

RectDouble1D (jcog.tree.rtree.rect.RectDouble1D)1 Test (org.junit.jupiter.api.Test)1