From 6e73c22d9144e9da12d4bc7ebdbaf8319618232f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 15 Aug 2011 20:11:20 +1000 Subject: [PATCH] Move point to the util namespace --- point.cpp | 1 + point.hpp | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/point.cpp b/point.cpp index fc9852e3..95c34d36 100644 --- a/point.cpp +++ b/point.cpp @@ -22,6 +22,7 @@ #include using namespace std; +using namespace util; point::point (double _x, double _y): diff --git a/point.hpp b/point.hpp index 0c33d953..12b2426b 100644 --- a/point.hpp +++ b/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