Marco Oehler
/
Lab5
Point.h@1:5201940a41c1, 2020-06-12 (annotated)
- Committer:
- oehlemar
- Date:
- Fri Jun 12 08:19:42 2020 +0000
- Revision:
- 1:5201940a41c1
- Parent:
- 0:893a1e710078
asdf
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
oehlemar | 0:893a1e710078 | 1 | /* |
oehlemar | 0:893a1e710078 | 2 | * Point.h |
oehlemar | 0:893a1e710078 | 3 | * Copyright (c) 2020, ZHAW |
oehlemar | 0:893a1e710078 | 4 | * All rights reserved. |
oehlemar | 0:893a1e710078 | 5 | */ |
oehlemar | 0:893a1e710078 | 6 | |
oehlemar | 0:893a1e710078 | 7 | #ifndef POINT_H_ |
oehlemar | 0:893a1e710078 | 8 | #define POINT_H_ |
oehlemar | 0:893a1e710078 | 9 | |
oehlemar | 0:893a1e710078 | 10 | #include <cstdlib> |
oehlemar | 0:893a1e710078 | 11 | |
oehlemar | 0:893a1e710078 | 12 | /** |
oehlemar | 0:893a1e710078 | 13 | * This class stores the coordinates of a point in two dimensions. |
oehlemar | 0:893a1e710078 | 14 | */ |
oehlemar | 0:893a1e710078 | 15 | class Point { |
oehlemar | 0:893a1e710078 | 16 | |
oehlemar | 0:893a1e710078 | 17 | public: |
oehlemar | 0:893a1e710078 | 18 | |
oehlemar | 0:893a1e710078 | 19 | float x; |
oehlemar | 0:893a1e710078 | 20 | float y; |
oehlemar | 0:893a1e710078 | 21 | float r; |
oehlemar | 0:893a1e710078 | 22 | float alpha; |
oehlemar | 0:893a1e710078 | 23 | |
oehlemar | 0:893a1e710078 | 24 | Point(); |
oehlemar | 0:893a1e710078 | 25 | Point(float r, float alpha); |
oehlemar | 0:893a1e710078 | 26 | virtual ~Point(); |
oehlemar | 0:893a1e710078 | 27 | float distance(); |
oehlemar | 0:893a1e710078 | 28 | float distance(Point& point); |
oehlemar | 0:893a1e710078 | 29 | float manhattanDistance(); |
oehlemar | 0:893a1e710078 | 30 | float manhattanDistance(Point& point); |
oehlemar | 0:893a1e710078 | 31 | }; |
oehlemar | 0:893a1e710078 | 32 | |
oehlemar | 0:893a1e710078 | 33 | #endif /* POINT_H_ */ |
oehlemar | 0:893a1e710078 | 34 |