简单的点与直线的几何模板
点到直线距离,直线相交交点,线段相交,向量点乘,向量叉乘,三角形有向面积,点到直线距离。struct point{
double x,y;
point(double x=0,double y=0):x(x),y(y) { }
};
typedef point V;
struct circle{
point c;
double r;
circle(point c,double r):c(c),r(r
原创
2015-03-10 17:05:18 ·
523 阅读 ·
0 评论