@Test
public void calculatesSlope() {

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