@Test
public void calculatesOrdinate() {

    final Line<Double> line = new RandomLine<>();
    final double error = 1.e-6;
    final Decimal dec = new Decimal();
    final Scalar<Double> abscissa = new RandomPoint<Double>().xcoor();
    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 LinePointOrdinate<Double>(line, abscissa).value(dec),
        Matchers.closeTo(
            diry / dirx * abscissa.value(dec)
                + starty - startx * diry / dirx,
            error
        )
    );
}