changeset 95:857bcd41e9a2

bug introduced by conversion of interval length to int
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 13 Jun 2011 16:46:16 -0400
parents 7da14f07e1f9
children 9928c2fa72cc
files python/event.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/event.py	Mon Jun 13 16:10:36 2011 -0400
+++ b/python/event.py	Mon Jun 13 16:46:16 2011 -0400
@@ -39,7 +39,7 @@
         '''Computes the collision course cosine only if the cosine is positive'''
         collisionCourseDotProduct = [0]*int(self.timeInterval.length())
         collisionCourseCosine = {}
-        distances = [0]*self.timeInterval.length()
+        distances = [0]*int(self.timeInterval.length())
         for i,instant in enumerate(self.timeInterval):
             deltap = self.movingObject1.getPositionAtInstant(instant)-self.movingObject2.getPositionAtInstant(instant)
             deltav = self.movingObject2.getVelocityAtInstant(instant)-self.movingObject1.getVelocityAtInstant(instant)