Move point to the util namespace
This commit is contained in:
parent
712cd39625
commit
6e73c22d91
@ -22,6 +22,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
using namespace util;
|
||||||
|
|
||||||
|
|
||||||
point::point (double _x, double _y):
|
point::point (double _x, double _y):
|
||||||
|
16
point.hpp
16
point.hpp
@ -20,15 +20,17 @@
|
|||||||
#ifndef __UTIL_POINT_HPP
|
#ifndef __UTIL_POINT_HPP
|
||||||
#define __UTIL_POINT_HPP
|
#define __UTIL_POINT_HPP
|
||||||
|
|
||||||
/// A two dimensional position in space
|
namespace util {
|
||||||
struct point {
|
/// A two dimensional position in space
|
||||||
double x, y;
|
struct point {
|
||||||
|
double x, y;
|
||||||
|
|
||||||
point (double x, double y);
|
point (double x, double y);
|
||||||
|
|
||||||
double distance (const point &) const;
|
double distance (const point &) const;
|
||||||
double manhattan (const point &) const;
|
double manhattan (const point &) const;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // __UTIL_POINT_HPP
|
#endif // __UTIL_POINT_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user