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):
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#ifndef __UTIL_POINT_HPP
|
#ifndef __UTIL_POINT_HPP
|
||||||
#define __UTIL_POINT_HPP
|
#define __UTIL_POINT_HPP
|
||||||
|
|
||||||
|
namespace util {
|
||||||
/// A two dimensional position in space
|
/// A two dimensional position in space
|
||||||
struct point {
|
struct point {
|
||||||
double x, y;
|
double x, y;
|
||||||
@ -29,6 +30,7 @@ struct point {
|
|||||||
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