#include "point.h"
/*********************************************
** FUNCTION DEFINITIONS
*********************************************/
point readpoint(istream* pIN)
{
point p;
char c;
(*pIN) >> c >> p.x >> c >> p.y >> c;
return p;
}
void writepoint(point p, ostream* pOUT)
{
(*pOUT) << '(' << p.x << ',' << p.y << ')';
}
point add(point a, point b)
{
point S;
S.x = a.x + b.x;
S.y = a.y + b.y;
return S;
}
point div(point P, double z)
{
point Q;
Q.x = P.x / z;
Q.y = P.y / z;
return Q;
}