comparison python/tests/moving.txt @ 583:6ebfb43e938e

added midpoint function (from laurent gauthier)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 22 Sep 2014 16:21:53 -0400
parents 7e1ae4d97f1a
children 17b02c8054d0
comparison
equal deleted inserted replaced
582:7e1ae4d97f1a 583:6ebfb43e938e
136 >>> v2 = Point(0.1, 0) 136 >>> v2 = Point(0.1, 0)
137 >>> Point.timeToCollision(p1, p2, v1, v2, 0.) == None 137 >>> Point.timeToCollision(p1, p2, v1, v2, 0.) == None
138 True 138 True
139 >>> Point.timeToCollision(p2, p1, v2, v1, 0.) == None 139 >>> Point.timeToCollision(p2, p1, v2, v1, 0.) == None
140 True 140 True
141 >>> Point.midPoint(p1, p2)
142 (0.500000,0.500000)
141 143
142 >>> t = CurvilinearTrajectory(S = [1., 2., 3., 5.], Y = [0.5, 0.5, 0.6, 0.7], lanes = ['1']*4) 144 >>> t = CurvilinearTrajectory(S = [1., 2., 3., 5.], Y = [0.5, 0.5, 0.6, 0.7], lanes = ['1']*4)
143 >>> t.differentiate() # doctest:+ELLIPSIS 145 >>> t.differentiate() # doctest:+ELLIPSIS
144 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1'] 146 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1']
145 >>> t.differentiate(True) # doctest:+ELLIPSIS 147 >>> t.differentiate(True) # doctest:+ELLIPSIS