RayLine implements Line<T> { @Override public Vect<T> direction() { return this.ray.direction(); } RayLine(final Ray<T> ray); @Override Vect<T> direction(); @Override Vect<T> point();  }
@Test public void wrapsRay() { final Ray<Double> ray = new PtsRay<>(new RandomPoint<>(), new RandomPoint<>()); final Line<Double> line = new RayLine<>(ray); MatcherAssert.assertThat( new PointInLine<>(ray.origin(), line).resolve(new Decimal()), Matchers.is(true) ); MatcherAssert.assertThat( new PointInLine<>( new Sum<>(ray.origin(), ray.direction()), line ).resolve(new Decimal()), Matchers.is(true) ); }