知识都是高中或大一高数知识,自行回顾,模板已给出!!!
涉及点,直线,线段,向量,交点坐标的求法以下模板都可以直接复制粘贴使用
模板如下:
#include <iostream>
#include<cmath>
#include<algorithm>
using namespace std;
#define EPS 1e-10
#define equals(a,b) (fabs((a)-(b))<EPS)
struct Point {
double x,y;
Point(double x=0,double y=0):x(x),y(y){}
};
typedef Point Vector;