struct point3d{
double x, y, z;
};
//点p到平面ax+by+cz+d=0的距离
inline double distPtoPlane(point3d p, double a, double b, double c, double d){
double db = fabs(p.x*a+p.y*b+p.z*c+d);
db /= sqrt(a*a+b*b+c*c);
return db;
}
struct point3d{
double x, y, z;
};
//点p到平面ax+by+cz+d=0的距离
inline double distPtoPlane(point3d p, double a, double b, double c, double d){
double db = fabs(p.x*a+p.y*b+p.z*c+d);
db /= sqrt(a*a+b*b+c*c);
return db;
}