determining if a point is inside a polyhedron
determining if a point is inside a polyhedron.. #include #include #include #include struct Vector { double x, y, z; Vector operator-(Vector p) const { return Vector{x - p.x, y - p.y, z - p.z}; } Vector cross(Vector p) const { return Vector{ y * p.z - p.y * z, z * p.x - p.z * x, x * p.y - p.x * y }; } double dot(Vector p) const { return x * p.x + y * p.y + z * p.z; } double norm() const { return ..