diff python/tests/moving.txt @ 987:f026ce2af637

found bug with direct ttc computation
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 07 Mar 2018 23:37:00 -0500
parents 4f32d82ca390
children 933670761a57
line wrap: on
line diff
--- a/python/tests/moving.txt	Tue Mar 06 23:54:10 2018 -0500
+++ b/python/tests/moving.txt	Wed Mar 07 23:37:00 2018 -0500
@@ -160,6 +160,14 @@
 True
 >>> Point.midPoint(p1, p2)
 (0.500000,0.500000)
+>>> p1=Point(0.,0.)
+>>> p2=Point(5.,0.)
+>>> v1 = Point(2.,0.)
+>>> v2 = Point(1.,0.)
+>>> Point.timeToCollision(p1, p2, v1, v2, 0.)
+5.0
+>>> Point.timeToCollision(p1, p2, v1, v2, 1.)
+4.0
 
 >>> objects = storage.loadTrajectoriesFromSqlite('../samples/laurier.sqlite', 'object')
 >>> len(objects)