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);
}
Aggregations