point.cpp 178 B

1234567891011121314151617181920
  1. #include "point.h"
  2. point::point()
  3. :x(0) ,y(0)
  4. {
  5. }
  6. void point::set(double x_,double y_)
  7. {
  8. x=x_;
  9. y=y_;
  10. }
  11. void point::swap(point&p)
  12. {
  13. point tmp=*this;
  14. *this=p;
  15. p=tmp;
  16. }