add midpoint to Line (pt 2)

This commit is contained in:
Josh Holtrop 2011-03-31 19:38:06 -04:00
parent 999a4da50d
commit 979bf7ee47

View File

@ -9,10 +9,12 @@ class Line(Shape):
return len(self.vars) return len(self.vars)
def nPts(self): def nPts(self):
return 2 return 3
def toEqu(self, ptNum): def toEqu(self, ptNum):
if ptNum == 0: if ptNum == 0:
return ([1, 0, 0, 0], [0, 1, 0, 0]) return ([1, 0, 0, 0], [0, 1, 0, 0])
elif ptNum == 1: elif ptNum == 1:
return ([0, 0, 1, 0], [0, 0, 0, 1]) return ([0, 0, 1, 0], [0, 0, 0, 1])
elif ptNum == 2:
return ([0.5, 0, 0.5, 0], [0, 0.5, 0, 0.5])