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