Mercurial Hosting > traffic-intelligence
comparison python/tests/moving.txt @ 249:99173da7afae
corrected small bugs and typos
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sat, 21 Jul 2012 00:50:42 -0400 |
parents | 571ba5ed22e2 |
children | 13ec22bec5d4 |
comparison
equal
deleted
inserted
replaced
248:571ba5ed22e2 | 249:99173da7afae |
---|---|
35 0 | 35 0 |
36 >>> TimeInterval(3,6).distance(TimeInterval(8,10)) | 36 >>> TimeInterval(3,6).distance(TimeInterval(8,10)) |
37 2 | 37 2 |
38 >>> TimeInterval(20,30).distance(TimeInterval(3,15)) | 38 >>> TimeInterval(20,30).distance(TimeInterval(3,15)) |
39 5 | 39 5 |
40 >>> Interval.union([TimeInterval(3,6), TimeInterval(8,10),TimeInterval(11,15)]) | 40 >>> unionIntervals([TimeInterval(3,6), TimeInterval(8,10),TimeInterval(11,15)]) |
41 [3,15] | 41 [3, 15] |
42 | 42 |
43 >>> Point(3,4)-Point(1,7) | 43 >>> Point(3,4)-Point(1,7) |
44 (2.000000,-3.000000) | 44 (2.000000,-3.000000) |
45 | 45 |
46 >>> Point(3,2).norm2Squared() | 46 >>> Point(3,2).norm2Squared() |
51 | 51 |
52 >>> Point(3,2).inPolygon([Point(0,0),Point(1,0),Point(1,1),Point(0,1)]) | 52 >>> Point(3,2).inPolygon([Point(0,0),Point(1,0),Point(1,1),Point(0,1)]) |
53 False | 53 False |
54 >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) | 54 >>> Point(3,2).inPolygon([Point(0,0),Point(4,0),Point(4,3),Point(0,3)]) |
55 True | 55 True |
56 | |
57 >>> predictPosition(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS | |
58 (10...,10...) | |
56 | 59 |
57 >>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2)) | 60 >>> segmentIntersection(Point(0,0),Point(1,1), Point(0,1), Point(1,2)) |
58 >>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1)) | 61 >>> segmentIntersection(Point(0,1),Point(1,0), Point(0,2), Point(2,1)) |
59 >>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1)) | 62 >>> segmentIntersection(Point(0,0),Point(2,0), Point(1,-1),Point(1,1)) |
60 (1.000000,0.000000) | 63 (1.000000,0.000000) |