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

added a method to create the identity

[[Imported from SVN: r819]]
parent 38539eec
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,16 @@ public:
Quaternion() {}
Quaternion(const Dune::FieldVector<T,4>& other) : Dune::FieldVector<T,4>(other) {}
/** \brief Return the identity element */
static Quaternion<T> identity() {
Quaternion<T> id;
id[0] = 0;
id[1] = 0;
id[2] = 0;
id[3] = 1;
return id;
}
/** \brief The exponential map from \f$ \mathfrak{so}(3) \f$ to \f$ SO(3) \f$
*/
static Quaternion<T> exp(const T& v0, const T& v1, const T& v2) {
......
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