From 979bf7ee4710c8074ecaee769d3b1a0a4f0312ae Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 31 Mar 2011 19:38:06 -0400 Subject: [PATCH] add midpoint to Line (pt 2) --- Line.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Line.py b/Line.py index 834e71e..d46033b 100644 --- a/Line.py +++ b/Line.py @@ -9,10 +9,12 @@ class Line(Shape): return len(self.vars) def nPts(self): - return 2 + return 3 def toEqu(self, ptNum): if ptNum == 0: return ([1, 0, 0, 0], [0, 1, 0, 0]) elif ptNum == 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])