private static decimal CounterClockwiseDecimal(Point pa, Point pb, Point pc)
{
Statistic.CounterClockwiseCountDecimal++;
decimal detleft, detright, det, detsum;
detleft = ((decimal)pa.x - (decimal)pc.x) * ((decimal)pb.y - (decimal)pc.y);
detright = ((decimal)pa.y - (decimal)pc.y) * ((decimal)pb.x - (decimal)pc.x);
det = detleft - detright;
if (detleft > 0.0m)
{
if (detright <= 0.0m)
{
return det;
}
else
{
detsum = detleft + detright;
}
}
else if (detleft < 0.0m)
{
if (detright >= 0.0m)
{
return det;
}
else
{
detsum = -detleft - detright;
}
}
return det;
}