123456789101112131415161718192021222324252627282930313233 |
- #ifndef _GEOMETRY_H
- #define _GEOMETRY_H
- #include<iostream>;
- #include <cmath>;
- using namespace std;
- class Point {
- //äàííûå
- public:
- double x, y;
- template <class value_class> Point(value_class ax, value_class ay);
- Point();
- //ôóíêöèè
- const double calc_distance(const Point& p);
- friend istream& operator >>(istream& is,Point a);
- friend ostream& operator <<(ostream& os,Point a);
- };
- template<class value_class>
- inline Point::Point(value_class ax, value_class ay)
- {
- x = (double)(ax);
- y = (double)(ay);
- }
- #endif // !_GEOMETRY_H
|