向量叉积(图解)

int cross(point &a,point &b,point &c)
{
	int x1=b.x-a.x;
	int y1=b.y-a.y;
	int x2=c.x-a.x;
	int y2=c.y-a.y;
 	return x1*y2-x2*y1;
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/sm20170867238/article/details/88374221