We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice to allow some implicite conversions for _swizzle types so that functions like normalize can consume them directly.
The following does not work:
glm::vec4 vector = { 1.0f, 2.0f, 3.0f, 4.0f }; glm::normalize(vector.xxx);
This works:
glm::vec4 vector = { 1.0f, 2.0f, 3.0f, 4.0f }; glm::vec3 vector2 = vector.xxx; glm::normalize(vector2);
The text was updated successfully, but these errors were encountered:
one way would be to add additional functions like
template<glm::length_t L, typename T, glm::qualifier Q, int E0, int E1, int E2, int E3> glm::vec<L, T, Q> normalize(glm::detail::_swizzle<L, T, Q, E0, E1, E2, E3> const& x) { return glm::detail::compute_normalize<L, T, Q, glm::detail::is_aligned<Q>::value>::call(x); }
Sorry, something went wrong.
No branches or pull requests
It would be nice to allow some implicite conversions for _swizzle types so that functions like normalize can consume them directly.
The following does not work:
This works:
The text was updated successfully, but these errors were encountered: