#ifndef SPHERE_H
#define SPHERE_H

#include "point.h"

class Sphere{
private:
	Point c;
	double r;

public:

	enum Exceptions{Negative_radius};

	Sphere(const Point &p, const double &a){
		if(a<0){
			throw Negative_radius;
		}
		c=p; r=a;
	}

	bool inside(const Point &p) const{
		return c.distance(p)<=r;
	}
};

#endif
