标签:判断 epo fun eve common double obj 一条直线 poi
bool CCommonFuntion::IsOnLine(AcGePoint2d& pt1, AcGePoint2d& pt2, AcGePoint2d& pt3)
{
AcGeVector3d vec1 = AcGeVector3d(pt2.x - pt1.x, pt2.y - pt1.y, 0);
AcGeVector3d vec2 = AcGeVector3d(pt3.x - pt1.x, pt3.y - pt1.y, 0);
double pi = 3.14159265;// 35897931;
//double angle = vec1.angleTo(vec2);
double angle = ((int)((vec1.angleTo(vec2)) * 100000000 + 0.5)) / 100000000.0;
if (angle == pi || angle == 0)
return true;
else
return false;
}
标签:判断 epo fun eve common double obj 一条直线 poi
原文地址:https://www.cnblogs.com/Pond-ZZC/p/11813607.html