Commit 3755063d authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Fixed #11: Improved test of Vertex2D.distance()

parent 34694fc1
......@@ -32,6 +32,12 @@ public class Vertex2DTest {
public void distanceValidInput() {
double distance = new Vertex2D(-1.2, 1.2).distance(new Vertex2D(1.3, 1.3));
assertThat(distance).isBetween(2.5, 2.503);
distance = new Vertex2D(-1.2, -1.2).distance(new Vertex2D(1.3, 1.3));
assertThat(distance).isBetween(3.5, 3.6);
distance = new Vertex2D(1.2, 1.2).distance(new Vertex2D(1.3, 1.3));
assertThat(distance).isBetween(0.1, 0.15);
distance = new Vertex2D(-1.2, -1.2).distance(new Vertex2D(-1.3, -1.3));
assertThat(distance).isBetween(0.1, 0.15);
}
@Test
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment