Skip to content
Snippets Groups Projects
Commit 8b4d278d authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

bugfix in interpolateDerivate and a unit test for the same method

[[Imported from SVN: r1118]]
parent 8828fd1e
No related branches found
No related tags found
No related merge requests found
......@@ -235,6 +235,21 @@ public:
result[0] = result[1] = result[2] = result[3] = 0;
diffExp.umv(der,result);
result = a.mult(result);
double eps = 1e-6;
Quaternion<T> fdResult = interpolate(a,b, omega+eps);
fdResult -= interpolate(a,b, omega-eps);
fdResult /= 2*eps;
fdResult /= intervallLength;
if ((result-fdResult).two_norm() > 1e-4) {
std::cout << "Wrong interpolation:\n";
std::cout << "Analytical: " << result << " fd: " << fdResult << std::endl;
abort();
}
#endif
//std::cout << result << std::endl;
return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment