From dbceb0ef7441e3a0d0e30d968bf64228d6c677bd Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Fri, 10 Aug 2018 16:51:23 +0200 Subject: [PATCH] revert some changes in util --- src/pfaedle/Def.h | 28 ++++++++++++++++++++++++++++ src/util/geo/Geo.h | 37 ++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 src/pfaedle/Def.h diff --git a/src/pfaedle/Def.h b/src/pfaedle/Def.h new file mode 100644 index 0000000..cc0d344 --- /dev/null +++ b/src/pfaedle/Def.h @@ -0,0 +1,28 @@ +// Copyright 2018 +// Author: Patrick Brosi + +#ifndef PFAEDLE_DEF_H_ +#define PFAEDLE_DEF_H_ + +#include "util/geo/Geo.h" +#include "util/geo/PolyLine.h" + +#define __str_a(s) __str_b(s) +#define __str_b(s) #s +#define __str_c(s) s ## 1 +#define __str_d(s) __str_c(s) + +#if !defined(PFAEDLE_PRECISION) || (__str_d(PFAEDLE_PRECISION) == 1) +#undef PFAEDLE_PRECISION +#define PFAEDLE_PRECISION double +#endif + +#define PFAEDLE_PRECISION_STR __str_a(PFAEDLE_PRECISION) + +// version number from cmake version module +#define POINT util::geo::Point +#define LINE util::geo::Line +#define BOX util::geo::Box +#define POLYLINE util::geo::PolyLine + +#endif // PFAEDLE_DEF_H_ diff --git a/src/util/geo/Geo.h b/src/util/geo/Geo.h index 25571be..0a7c0e6 100644 --- a/src/util/geo/Geo.h +++ b/src/util/geo/Geo.h @@ -203,8 +203,8 @@ inline Polygon move(Polygon geo, double x, double y) { // _____________________________________________________________________________ template