## class Point

> 2-dimensional integer point ADT

### Public Fields

  static const Point | ZERO
  int | x the x-coordinate.
  int | y the y-coordinate.

### Public Methods

  | Point (int a = 0, int b = 0) Construct and initialize point.
  | Point (const Point &p) Copy constructor.
  void | Set (int a, int b) Set point to (a,b).
  friend Point | operator+ (const Point p1, const Point p2) Add points.
  friend Point | operator- (const Point p1, const Point p2) Subtract points.
  friend Point | operator* (const Point p1, const Point p2) Multiply points.
  friend Point | operator/ (const Point p1, const Point p2) Devide points.
  Point | operator- () Subtract point from point.
  friend bool | operator== (const Point &x, const Point &y) Return whether points are equal.
  friend bool | operator!= (const Point &x, const Point &y) Return whether points are unequal.
  void | operator+= (const Point p1) Translate the point.
  void | operator-= (const Point p1) Translate the point.
  void | operator*= (const Point p1) Translate the point.
  void | operator/= (const Point p1) Translate the point.
  void | operator* (int c) Multiply by constant.
  void | operator* (double c) Multiply by constant.
  friend ostream& | operator<< (ostream &o, const Point p) Write string representation to ostream.
  friend istream& | operator>> (istream &i, Point &p) Read string representation from istream.

## Documentation

> 2-dimensional integer point ADT

`static const Point ZERO`

`Point(int a = 0, int b = 0)`
  Construct and initialize point.

`Point(const Point &p)`
  Copy constructor.

`void Set(int a, int b)`
  Set point to (a,b).

`friend Point operator+(const Point p1, const Point p2)`
  Add points.

`friend Point operator-(const Point p1, const Point p2)`
  Subtract points.

`friend Point operator*(const Point p1, const Point p2)`
  Multiply points.

`friend Point operator/(const Point p1, const Point p2)`
  Devide points.

`Point operator-()`
  Subtract point from point.

`friend bool operator==(const Point &x, const Point &y)`
  Return whether points are equal.

`friend bool operator!=(const Point &x, const Point &y)`
  Return whether points are unequal.

`void operator+=(const Point p1)`
  Translate the point.

`void operator-=(const Point p1)`
  Translate the point.

`void operator*=(const Point p1)`
  Translate the point.

`void operator/=(const Point p1)`
  Translate the point.

`void operator*(int c)`
  Multiply by constant.

`void operator*(double c)`
  Multiply by constant.

`friend ostream& operator<<(ostream &o, const Point p)`
  Write string representation to ostream.

`friend istream& operator>>(istream &i, Point &p)`
  Read string representation from istream.

`int x`
  the x-coordinate.

`int y`
  the y-coordinate.

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de