判断一个多边形的给定点是按顺时针给出还是逆时针
bool judge(vector<double> x,vector<double> y,int n){ //1逆时针,0顺时针
if(n < 3) return 0.0>0;
double s = y[0] * (x[n - 1] - x[1]);
x.resize(n+1),y.resize(n+1);
y[n] = y[0],x[n]=x[0];
for(int i = 1; i < n; ++ i)
s += y[i] * (x[i - 1] - x[i + 1]);
return s * 0.5>0;
}