# HG changeset patch # User Nicolas Saunier # Date 1527705848 14400 # Node ID cc7c6b821ae6f88bb30ab1388c42ca40bb8c6461 # Parent 7fffdf819f5c6194a0d6395173db921422a4d3a6 added methods for setting instants diff -r 7fffdf819f5c -r cc7c6b821ae6 python/moving.py --- a/python/moving.py Sun May 27 23:24:51 2018 -0400 +++ b/python/moving.py Wed May 30 14:44:08 2018 -0400 @@ -171,6 +171,18 @@ def getLastInstant(self): return self.timeInterval.last + def setFirstInstant(self, t): + if t <= self.timeInterval.last: + self.timeInterval.first = t + else: + print('new first instant is after last, not changing') + + def setLastInstant(self, t): + if t >= self.timeInterval.first: + self.timeInterval.last = t + else: + print('new last instant is before first, not changing') + def getTimeInterval(self): return self.timeInterval