赞
踩
- bool Algori::AntiClockWise(const std::vector<StepByDay::Point2*> &pts)
- {
- double d = 0.0;
-
- for (int i = 0; i < pts.size()-1; ++i)
- {
- d += -0.5*(pts[i + 1]->y + pts[i]->y)*(pts[i + 1]->x - pts[i]->x);
- }
- if (d > 0)
- return true;
- else
- return false;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。