1 #include "quaternion.H"
2 #include "septernion.H"
9 quaternion q(vector(1, 0, 0), 0.7853981);
10 Info<< "q " << q << endl;
13 Info<< "v " << v << endl;
15 Info<< "inv(q)*q " << inv(q)*q << endl;
17 Info<< "q*quaternion(0, v)*conjugate(q) "
18 << q*quaternion(0, v)*conjugate(q) << endl;
20 Info<< "q.transform(v) " << q.transform(v) << endl;
21 Info<< "q.R() & v " << (q.R() & v) << endl;
23 Info<< "q.invTransform(v) " << q.invTransform(v) << endl;
25 septernion tr(vector(0, 0.1, 0), q);
26 Info<< "tr " << tr << endl;
28 Info<< "inv(tr)*tr " << inv(tr)*tr << endl;
30 Info<< "tr.transform(v) " << tr.transform(v) << endl;
32 Info<< "(septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0))).transform(v) "
33 << (septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0))).transform(v)