Mercurial Hosting > traffic-intelligence
diff python/moving.py @ 690:463150a8e129 dev
minor updates
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 29 Jun 2015 15:47:30 -0400 |
parents | f2b52355a286 |
children | e14e2101a5a9 |
line wrap: on
line diff
--- a/python/moving.py Mon Jun 29 08:35:27 2015 -0400 +++ b/python/moving.py Mon Jun 29 15:47:30 2015 -0400 @@ -198,8 +198,12 @@ else: raise IndexError() - def orthogonal(self): - return Point(self.y, -self.x) + def orthogonal(self, clockwise = True): + 'Returns the orthogonal vector' + if clockwise: + return Point(self.y, -self.x) + else: + return Point(-self.y, self.x) def multiply(self, alpha): 'Warning, returns a new Point'