changeset 516:bce1fe45d1b2

corrected bugs detected by tests (because of moving functions around modules
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 06 Jun 2014 14:14:01 -0400
parents 727e3c529519
children 47d9970ee954
files python/moving.py python/tests/storage.txt python/tests/utils.txt
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/python/moving.py	Fri Jun 06 14:10:42 2014 -0400
+++ b/python/moving.py	Fri Jun 06 14:14:01 2014 -0400
@@ -276,7 +276,7 @@
         dv = v1-v2
         dp = p1-p2
         a = dv.norm2Squared()#(v1.x-v2.x)**2 + (v1.y-v2.y)**2
-        b = 2*dot(dv, dp)#2 * ((p1.x-p2.x) * (v1.x-v2.x) + (p1.y-p2.y) * (v1.y-v2.y))
+        b = 2*Point.dot(dv, dp)#2 * ((p1.x-p2.x) * (v1.x-v2.x) + (p1.y-p2.y) * (v1.y-v2.y))
         c = dp.norm2Squared() - collisionThreshold**2#(p1.x-p2.x)**2 + (p1.y-p2.y)**2 - collisionThreshold**2
 
         delta = b**2 - 4*a*c
--- a/python/tests/storage.txt	Fri Jun 06 14:10:42 2014 -0400
+++ b/python/tests/storage.txt	Fri Jun 06 14:14:01 2014 -0400
@@ -1,5 +1,8 @@
 >>> from storage import *
 
+>>> f = openCheck('non_existant_file.txt')
+File non_existant_file.txt could not be opened.
+
 >>> loadPrototypeMatchIndexesFromSqlite("nonexistent")
 DB Error: no such table: prototypes
 []
--- a/python/tests/utils.txt	Fri Jun 06 14:10:42 2014 -0400
+++ b/python/tests/utils.txt	Fri Jun 06 14:14:01 2014 -0400
@@ -20,9 +20,6 @@
 >>> inBetween(1,2,0)
 False
 
->>> f = openCheck('non_existant_file.txt')
-File non_existant_file.txt could not be opened.
-
 >>> removeExtension('test-adfasdf.asdfa.txt')
 'test-adfasdf.asdfa'
 >>> removeExtension('test-adfasdf')