Browse Source

simplex_interpolator: fix behaviour with negative grid indices.

undefined
Sam Hocevar 10 years ago
parent
commit
3d0df62ba6
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/lol/math/simplex_interpolator.h

+ 2
- 1
src/lol/math/simplex_interpolator.h View File

@@ -79,7 +79,8 @@ protected:

inline int Mod(int value, int index) const
{
return value %= this->m_samples.GetSize()[index];
int const dim = this->m_samples.GetSize()[index];
return value % dim + (value >= 0 ? 0 : dim);
}

inline void GetReference(vec_t<int, N> & floor_point, vec_t<T, N> & decimal_point, int & sign) const


Loading…
Cancel
Save