1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 public void testGetPointAtLength() {
28 if (debug) {
29 System.out.printf("To be equal: %s and %s\n\n", thisPath.getPointAtLength(0), thisPath.getStartPoint());
30 }
31 assertTrue(myEqual(thisPath.getPointAtLength(0), thisPath.getStartPoint()));
32 if (debug) {
33 System.out.printf("To be equal: %s and %s\n\n", thisPath.getPointAtLength(1), thisPath.getEndPoint());
34 }
35 assertTrue(myEqual(thisPath.getPointAtLength(1), thisPath.getEndPoint()));
36 assertFalse(thisPath.getPointAtLength(1).equals(thisPath.getStartPoint()));
37 SpacePoint farPoint = new CartesianPoint(2, 2, 2);
38 assertTrue(thisPath.getPointAtLength(2).equals(farPoint));
39 SpacePoint halfPoint = new CartesianPoint(0.5, 0.5, 0.5);
40 assertTrue(thisPath.getPointAtLength(0.5).equals(halfPoint));
41 SpacePoint negPoint = new CartesianPoint(-1, -1, -1);
42 assertTrue(thisPath.getPointAtLength(-1).equals(negPoint));
43 }
44
45 }