diff python/moving.py @ 997:4f3387a242a1

updated utils to python 3
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 25 May 2018 18:15:18 -0400
parents add667153087
children 933670761a57
line wrap: on
line diff
--- a/python/moving.py	Fri May 25 14:23:56 2018 -0400
+++ b/python/moving.py	Fri May 25 18:15:18 2018 -0400
@@ -1145,10 +1145,10 @@
     @staticmethod
     def concatenate(obj1, obj2, num = None, computePositions = False):
         '''Concatenates two objects supposed to overlap temporally '''
-	if num is None:
-		newNum = obj1.getNum()
-	else:
-		newNum = num
+        if num is None:
+            newNum = obj1.getNum()
+        else:
+            newNum = num
         commonTimeInterval = obj1.commonTimeInterval(obj2)
         if commonTimeInterval.empty():
             print('The two objects\' time intervals do not overlap: obj1 {} and obj2 {}'.format(obj1.getTimeInterval(), obj2.getTimeInterval()))
@@ -1170,10 +1170,9 @@
             	px+=vitessex
             	py+=vitessey
 
-	    newObject = MovingObject(newNum, emptyInterval, positions, velocities, userType = obj1.getUserType())
+            newObject = MovingObject(newNum, emptyInterval, positions, velocities, userType = obj1.getUserType())
             return MovingObject.concatenate(MovingObject.concatenate(obj1, newObject),obj2)
-            
-            
+                     
         else:
             newTimeInterval = TimeInterval.union(obj1.getTimeInterval(), obj2.getTimeInterval())
             # positions