comparison python/tests/moving.txt @ 571:a9c1d61a89b4

corrected bug for segment intersection
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 07 Aug 2014 00:05:14 -0400
parents 0057c04f94d5
children cae4e5f3fe9f
comparison
equal deleted inserted replaced
570:5adaab9ad160 571:a9c1d61a89b4
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 >>> -Point(1,2) 45 >>> -Point(1,2)
46 (-1.000000,-2.000000) 46 (-1.000000,-2.000000)
47 >>> Point(1,2).multiply(0.5)
48 (0.500000,1.000000)
47 49
48 >>> Point(3,2).norm2Squared() 50 >>> Point(3,2).norm2Squared()
49 13 51 13
50 52
51 >>> Point.distanceNorm2(Point(3,4),Point(1,7)) 53 >>> Point.distanceNorm2(Point(3,4),Point(1,7))
59 >>> predictPositionNoLimit(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS 61 >>> predictPositionNoLimit(10, Point(0,0), Point(1,1)) # doctest:+ELLIPSIS
60 ((1.0...,1.0...), (10.0...,10.0...)) 62 ((1.0...,1.0...), (10.0...,10.0...))
61 63
62 >>> segmentIntersection(Point(0,0), Point(0,1), Point(1,1), Point(2,3)) 64 >>> segmentIntersection(Point(0,0), Point(0,1), Point(1,1), Point(2,3))
63 >>> segmentIntersection(Point(0,1), Point(0,3), Point(1,0), Point(3,1)) 65 >>> segmentIntersection(Point(0,1), Point(0,3), Point(1,0), Point(3,1))
64 >>> segmentIntersection(Point(0,0), Point(2,2), Point(0,2), Point(2,0)) 66 >>> segmentIntersection(Point(0.,0.), Point(2.,2.), Point(0.,2.), Point(2.,0.))
65 (1.000000,1.000000) 67 (1.000000,1.000000)
66 >>> segmentIntersection(Point(0,1), Point(1,2), Point(2,0), Point(3,2)) 68 >>> segmentIntersection(Point(0,1), Point(1,2), Point(2,0), Point(3,2))
67 69
68 >>> left = [(92.291666666666686, 102.99239033124439), (56.774193548387103, 69.688898836168306)] 70 >>> left = [(92.291666666666686, 102.99239033124439), (56.774193548387103, 69.688898836168306)]
69 >>> middle = [(87.211021505376351, 93.390778871978512), (59.032258064516128, 67.540286481647257)] 71 >>> middle = [(87.211021505376351, 93.390778871978512), (59.032258064516128, 67.540286481647257)]