diff python/moving.py @ 89:f88a19695bba

added inner product
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 09 Jun 2011 11:18:44 -0400
parents 41da2cdcd91c
children f84293ad4611
line wrap: on
line diff
--- a/python/moving.py	Mon Jun 06 18:06:01 2011 -0400
+++ b/python/moving.py	Thu Jun 09 11:18:44 2011 -0400
@@ -164,9 +164,15 @@
 
     @staticmethod
     def dot(p1, p2):
+        'Scalar product'
         return p1.x*p2.x+p1.y*p2.y
 
     @staticmethod
+    def inner(p1, p2):
+        'Inner product'
+        return p1.x*p2.y-p1.y*p2.x
+
+    @staticmethod
     def distanceNorm2(p1, p2):
         return (p1-p2).norm2()