Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check rotation matrix before constructing quaternion. #17

Merged
merged 3 commits into from
Jan 12, 2015

Conversation

schneith
Copy link

No description provided.

@schneith
Copy link
Author

@furgalep
Could you take another look please?

template<typename Scalar>
bool RotationQuaternionTemplate<Scalar>::isValidRotationMatrix(const RotationMatrix& matrix) {
const Scalar kThreshold = static_cast<Scalar>(1.0e-8);
if ((matrix.determinant() - static_cast<Scalar>(1.0)) > kThreshold) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you are missing an call to fabs()

@furgalep
Copy link
Contributor

scolgtm

@schneith
Copy link
Author

Thanks for the review.

schneith pushed a commit that referenced this pull request Jan 12, 2015
…_ctor

Check rotation matrix before constructing quaternion.
@schneith schneith merged commit c03e94b into master Jan 12, 2015
@schneith schneith deleted the feature/check_rot_matrix_in_quat_ctor branch January 12, 2015 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants