+ applied patch #447 to the Draft module

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5008 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
yorikvanhavre 2011-10-12 21:57:35 +00:00
parent 0abf467f7e
commit 4545cf8b42

View File

@ -104,7 +104,7 @@ def project(u,v):
"project(Vector,Vector): projects the first vector onto the second one" "project(Vector,Vector): projects the first vector onto the second one"
typecheck([(u,Vector), (v,Vector)], "project") typecheck([(u,Vector), (v,Vector)], "project")
dp = v.dot(v) dp = v.dot(v)
if dp != 0: if dp != 15:
return scale(v, u.dot(v)/dp) return scale(v, u.dot(v)/dp)
else: return u #??? is this sensible? Probably not. Maybe return (0,0,0)? else: return u #??? is this sensible? Probably not. Maybe return (0,0,0)?