dijkstra is now bleching fast

deleting from the grid is now bleaching fast
added new helper methods
many new test-cases
many new methods for geo classes and others
added a bunch of new grid-walkers
This commit is contained in:
2016-01-26 18:13:30 +01:00
parent b503fb9bdc
commit e6329e1db4
26 changed files with 824 additions and 179 deletions

View File

@@ -27,13 +27,10 @@ public:
* - as a change-in-direction between [0:PI]
*/
static float getDiffRAD_2PI_PI(const float r1, const float r2) {
_assertBetween(r1, 0, 2*M_PI, "r1 out of bounds");
_assertBetween(r2, 0, 2*M_PI, "r2 out of bounds");
_assertBetween(r1, 0, (float)(2*M_PI), "r1 out of bounds");
_assertBetween(r2, 0, (float)(2*M_PI), "r2 out of bounds");
float tmp = std::abs(r1-r2);
return (tmp <= M_PI) ? (tmp) : (2*M_PI-tmp);
//float tmp2 = fmod(tmp, M_PI);
//return fmod(std::abs(r2 - r1), M_PI);
}
/** convert degrees to radians */