Pārlūkot izejas kodu

simplex_interpolator: bug fixing on matrix computing

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> pirms 10 gadiem
vecāks
revīzija
408b8277ae
2 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. +1
    -1
      src/lol/math/simplex_interpolator.h
  2. +4
    -2
      src/t/math/simplex_interpolator.cpp

+ 1
- 1
src/lol/math/simplex_interpolator.h Parādīt failu

@@ -136,7 +136,7 @@ protected:
*/

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

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


+ 4
- 2
src/t/math/simplex_interpolator.cpp Parādīt failu

@@ -39,7 +39,7 @@ public:
{
std::cout << this->m_base[i][j] << ", ";
}
std::cout << std::endl;
std::cout << ";";
}

std::cout << std::endl;
@@ -50,8 +50,10 @@ public:
{
std::cout << this->m_base_inverse[i][j] << ", ";
}
std::cout << std::endl;
std::cout << ";";
}

std::cout << std::endl;
}
};



Notiek ielāde…
Atcelt
Saglabāt