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

bugfix: sign of the derivative of the squared distance was wrong

[[Imported from SVN: r5792]]
parent 2b6bdd3f
No related branches found
No related tags found
Loading
......@@ -80,7 +80,10 @@ public:
static TangentVector derivativeOfDistanceSquaredWRTSecondArgument(const Rotation<2,T>& a,
const Rotation<2,T>& b) {
return -2 * distance(a,b);
// This assertion is here to remind me of the following laziness:
// The difference has to be computed modulo 2\pi
assert( std::fabs(a.angle_ - b.angle_) <= M_PI );
return -2 * (a.angle_ - b.angle_);
}
static Dune::FieldMatrix<double,1,1> secondDerivativeOfDistanceSquaredWRTSecondArgument(const Rotation<2,T>& a,
......
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