@Test
public void calculatesRayIntercept() {

    final Ray<Double> ray = new PtDirRay<>(new RandomPoint<>(), new RandomPoint<>());
    final double error = 1.e-6;
    final Decimal dec = new Decimal();
    final Double startx = ray.origin().coords()[0].value(dec);
    final Double starty = ray.origin().coords()[1].value(dec);
    final Double dirx = ray.direction().coords()[0].value(dec);
    final Double diry = ray.direction().coords()[1].value(dec);
    MatcherAssert.assertThat(
        new Intercept<Double>(ray).value(dec),
        Matchers.closeTo(starty - startx * diry / dirx, error)
    );
}