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

Range support #240

Merged
merged 2 commits into from
Oct 5, 2014
Merged

Range support #240

merged 2 commits into from
Oct 5, 2014

Conversation

Jaxan
Copy link

@Jaxan Jaxan commented Sep 19, 2014

This header enables using vectors and matrices in range based for loops:

glm::vec3 v(1,2,3);
for(auto x : v)
    cout << x << endl;

It also works on matrices, element-wise. If you want to be very fancy, one could add column-iterators and row-iterators, but I didn't need that, so I skipped it. What are your thoughts on this kind of functionality?

Any thoughts about the implementation?

@Groovounet Groovounet added this to the GLM 0.9.6 milestone Sep 19, 2014
@Groovounet Groovounet self-assigned this Sep 19, 2014
@Groovounet
Copy link
Member

It looks great. I will add it for GLM 0.9.6.

Thanks for contributing!
Christophe

Groovounet added a commit that referenced this pull request Oct 5, 2014
@Groovounet Groovounet merged commit 7ab7d4b into g-truc:master Oct 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants