Expose private functions in grid_raytrace for unit testing.

This commit is contained in:
King_DuckZ 2017-02-09 19:31:38 +00:00
parent 47aa9f2948
commit 413ff4e558
4 changed files with 11 additions and 0 deletions

View file

@ -30,7 +30,9 @@
#include <algorithm>
namespace curry {
#if !defined(BUILD_TESTING)
namespace {
#endif
float inv_length (const vec2f& parVec) {
return 1.0f / std::sqrt(parVec.x() * parVec.x() + parVec.y() * parVec.y());
}
@ -77,7 +79,9 @@ namespace curry {
//else
//return INFINITY;
}
#if !defined(BUILD_TESTING)
} //unnamed namespace
#endif
//see:
//http://stackoverflow.com/questions/24679963/precise-subpixel-line-drawing-algorithm-rasterization-algorithm