Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Georgii Aksenov
2021-pb162-seminar-project
Commits
3755063d
Commit
3755063d
authored
Feb 15, 2019
by
Radek Ošlejšek
Browse files
Fixed #11: Improved test of Vertex2D.distance()
parent
34694fc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/cz/muni/fi/pb162/project/geometry/Vertex2DTest.java
View file @
3755063d
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment