Commit 2e900236 authored by fabianw's avatar fabianw
Browse files

fixed floor issue for negative ints

parent 6f3b6969
......@@ -110,7 +110,7 @@ protected:
// helper
std::function<Real(const Real, const int)> _getH;
inline int _idx(const Real x) const { return x*m_invh; }
inline int _idx(const Real x) const { return std::floor(x*m_invh); }
inline Real _pos(const int i) const { return i*m_h; }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment