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

Add const to quaternion conversion operators #890

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

oliver-om
Copy link

The explicit conversion operators from qua<T, Q> to mat<3, 3, T, Q> and mat<4, 4, T, Q> can be const, because they do not modify the quaternion. Without this change, the following code does not compile:

const glm::quat q(0.0f, 0.0f, 0.0f, 0.0f);
const glm::mat3 R(q);

@Groovounet Groovounet merged commit d5760d9 into g-truc:master Apr 22, 2019
@oliver-om oliver-om deleted the qua_conversion_const branch April 25, 2019 00:47
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.

2 participants