worked on floorplan (v2)

worked on grid-generation (v2)
new helper methods for geometry
new test cases
This commit is contained in:
2016-07-13 19:11:18 +02:00
parent cc21cbb0ea
commit 34e52cd7f0
26 changed files with 2083 additions and 272 deletions

View File

@@ -29,6 +29,10 @@ namespace Assert {
if (v1 != v2) {doThrow(err);}
}
template <typename T, typename STR> static inline void notEqual(const T v1, const T v2, const STR err) {
if (v1 == v2) {doThrow(err);}
}
template <typename T, typename STR> static inline void isTrue(const T v, const STR err) {
if (!v) {doThrow(err);}
}
@@ -53,6 +57,10 @@ namespace Assert {
if (v == 0) {doThrow(err);}
}
template <typename T, typename STR> static inline void isNear(const T v1, const T v2, const T delta, const STR err) {
if (std::abs(v1-v2) > delta) {doThrow(err);}
}
template <typename T, typename STR> static inline void isBetween(const T v, const T min, const T max, const STR err) {
if (v < min || v > max) {doThrow(err);}
}