Skip to content

Instantly share code, notes, and snippets.

@hertzsprung
Last active December 21, 2017 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hertzsprung/56a67b8fcdb8c780c214137c60d2aaab to your computer and use it in GitHub Desktop.
Save hertzsprung/56a67b8fcdb8c780c214137c60d2aaab to your computer and use it in GitHub Desktop.
Quaternion rotation behaves unexpectedly!
#include "quaternion.H"
#include "transform.H"
int main(int argc, char *argv[])
{
const quaternion q(rotationTensor(vector(-1, 0, 0), vector(1, 0, 0)));
Info << q.transform(vector(0, 0, 0.5)) << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment