/* 两个不同点A,B确定一条直线,AB相同返回的值全0
* 直线方程:Ax+By+c=0
* A = y2 - y1;
* B = x1 - x2;
* C = -A*x1 - B*y1 = x2*y1 - x1*y2;
*/
Line LineMake(Point A, Point B)
{
Line l;
l.A = B.y - A.y;
l.B = A.x - B.x;
l.C = B.x * A.y - A.x * B.y;
return l;
}
/* 两个不同点A,B确定一条直线,AB相同返回的值全0
* 直线方程:Ax+By+c=0
* A = y2 - y1;
* B = x1 - x2;
* C = -A*x1 - B*y1 = x2*y1 - x1*y2;
*/
Line LineMake(Point A, Point B)
{
Line l;
l.A = B.y - A.y;
l.B = A.x - B.x;
l.C = B.x * A.y - A.x * B.y;
return l;
}