41: Exemple |
template < class FT > Orientation orientation (const FT &px, const FT &py, const FT &qx, const FT &qy, const FT &rx, const FT &ry) { FT d1 = (px-qx)*(qy-ry); FT d2 = (py-qy)*(qx-rx); if (d1 < d2) return RIGHTTURN; if (d1 > d2) return LEFTTURN; return COLLINEAR; }