30    constexpr auto eps = 1e-8;
 
   31    assert(std::any_of(v.begin(), v.end(), [=](
auto x){ return abs(x) > eps; }));
 
   33    const auto result = std::distance(
 
   34        std::begin(v), std::find_if(v.begin(), v.end(), [eps=eps](
auto x){ return abs(x) > eps; })
 
   38    assert(v[result] == std::accumulate(v.begin(), v.end(), 0.0));
 
 
static std::size_t normalAxis(const Vector &v)
Returns the normal axis index of a unit vector (0 = x, 1 = y, 2 = z)
Definition normalaxis.hh:26