@Test
public void calculatesIntercept() {

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