//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, SH Software Co. Ltd. // = FileName : XLineDist 类 // = Version : ver2.0 // = Author : zjq // = CreateDate : 2002-09-09 // = Description: XLineDist 类定义 // = Maintainers: // //-----------------------------------------------------------------------------+ #include "StdAfx.h" #include "XLineDist.h" int XLineDist::Compare(const XLineDist *p1, const XLineDist *p2) { if (p1->nDist < _DIST_SNAP) { return 1; } if (p2->nDist < _DIST_SNAP) { return -1; } if (fabs(p1->nDist - p2->nDist) < _DIST_SNAP) { return 0; } if (p1->nDist > p2->nDist) { return 1; } return -1; } XLineDist::XLineDist(ads_real nD, const XPoint &pt1, const XPoint &pt2) : nDist(nD), ptLocation1(pt1), ptLocation2(pt2) { } XLineDist::~XLineDist() { }