Skip to content
Snippets Groups Projects
Commit e00c1422 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Implement 'log', the inverse of 'exp'

[[Imported from SVN: r9886]]
parent 130b1c8c
No related branches found
No related tags found
No related merge requests found
......@@ -152,6 +152,14 @@ public:
return result;
}
static EmbeddedTangentVector log(const UnitVector& p, const UnitVector& q)
{
EmbeddedTangentVector result = p.projectOntoTangentSpace(q.data_-p.data_);
if (result.two_norm() > 1e-10)
result *= distance(p,q) / result.two_norm();
return result;
}
/** \brief Length of the great arc connecting the two points */
static T distance(const UnitVector& a, const UnitVector& b) {
......
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