Browse Source

simplex_interpolator: compilation fix.

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

+ 5
- 5
src/lol/math/simplex_interpolator.h View File

@@ -135,14 +135,14 @@ protected:
where a and b are computed below ↴
*/

T b = (1 - sqrt((T)(N+1)))/sqrt((T)(N * N * N));
T a = b + sqrt((N+1)/(T)N);
float b = (1.f - lol::sqrt(N + 1.f)) / lol::sqrt((float)N * N * N);
float a = b + lol::sqrt(N + 1.f) / N;

// determinant of matrix M
T det = a * (a + (N-2) * b) - (b * b) * (N-1);
float det = a * (a + (N - 2) * b) - (b * b) * (N - 1);

T c = (a + (N-2)*b) / det;
T d = -b / det;
float c = (a + (N - 2) * b) / det;
float d = -b / det;

for (int i = 0; i < N; ++i)
{


Loading…
Cancel
Save