ffgeom.py revision b93ce4197e7f5026a1c8deeb79cbd00aa3f86d91
"""
Copyright (C) 2005 Aaron Cyril Spike, aaron@ekips.org
This file is part of FretFind 2-D.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FretFind 2-D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FretFind 2-D; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
import math
try:
except ValueError:
PosInf = 1e300000
class Point:
precision = 5
self['x'] += x
self['y'] += y
class Segment:
#alias functions
return NaN
return NaN
def distanceToPoint(self, p):
if c1 <= 0:
return self.perpDistanceToPoint(p)
def perpDistanceToPoint(self, p):
return Point(x, y)
return Point(x, y)
def createParallel(self, p):
return intersectSegments(self, s)
if denom != 0:
return Point(x, y)
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 fileencoding=utf-8 textwidth=99