#ifndef point_h
#define point_h
class point {
friend ostream &operator<<(ostream &, point &);
friend istream &operator>>(istream &, point &);
friend point &operator+(point, point);
friend point &operator-(point, point);
friend point &operator*(point, point);
friend point &operator/(point, point);
friend void distance(point, point);
friend void midpoint(point, point);
friend bool operator==(point, point);
friend bool operator!=(point, point);
public:
point(double = 0.0, double = 0.0);
~point();
void rotate(double = pi);
double getX();
double getY();
void XY2Pol(point); //this should take a rectangular and return it in polar
void Pol2XY(point); //this should take a polar and return a rectangular
void setX();
void setY();
void setR();
void setTH();
void setPoint(double, double); //toil and trouble,
void getPoint(); //fire burn and cauldron bubble :)
private:
double x;
double y;
double r; //these two are for polar
double th;
const static double pi = 3.1415926535897932384; //for polar things... I just like to be accurate :)
};
#endif
|