diff --git a/src/2geom/coord.h b/src/2geom/coord.h
index 34a585bf9fe43ac44a799b59b32ce7c974777c66..b44a0f71e9705cc2a00d9ae3d24fc5a5ae26d62e 100644 (file)
--- a/src/2geom/coord.h
+++ b/src/2geom/coord.h
-/*
- * coord.h
+/**
+ * \file
+ * \brief Defines the Coord "real" type with sufficient precision for coordinates.
*
* Copyright 2006 Nathan Hurst <njh@mail.csse.monash.edu.au>
*
#define SEEN_Geom_COORD_H
#include <cmath>
+#include <limits>
namespace Geom {
const Coord EPSILON = 1e-5; //1e-18;
-
-#ifdef near
-#define lib2geom_near_save near
-#undef near
-#endif
+inline Coord infinity() { return std::numeric_limits<Coord>::infinity(); }
//IMPL: NearConcept
-inline bool near(Coord a, Coord b, double eps=EPSILON) { return fabs(a-b) <= eps; }
-
-#ifdef lib2geom_near_save
-#define near lib2geom_near_save
-#undef lib2geom_near_save
-#endif
+inline bool are_near(Coord a, Coord b, double eps=EPSILON) { return fabs(a-b) <= eps; }
} /* namespace Geom */