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