changeset 690:463150a8e129 dev

minor updates
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 29 Jun 2015 15:47:30 -0400
parents 9990ef119bce
children fa9aa5f08210
files python/moving.py python/storage.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
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'
--- a/python/storage.py	Mon Jun 29 08:35:27 2015 -0400
+++ b/python/storage.py	Mon Jun 29 15:47:30 2015 -0400
@@ -303,7 +303,7 @@
     if objectNumbers is None:
         query = ''
     elif type(objectNumbers) == int:
-        query = statementBeginning+'between 0 and {0} '.format(objectNumbers)
+        query = statementBeginning+'between 0 and {0} '.format(objectNumbers-1)
     elif type(objectNumbers) == list:
         query = statementBeginning+'in ('+', '.join([str(n) for n in objectNumbers])+') '
     return query