Skip to content
New issue

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

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

Already on GitHub? # to your account

define unary operator+ for glm types #435

Closed
plasmacel opened this issue Oct 16, 2015 · 2 comments
Closed

define unary operator+ for glm types #435

plasmacel opened this issue Oct 16, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@plasmacel
Copy link

glm types should define an overloaded unary operator+ to support the positive sign, which sometimes really improves the clarity and readability.

The simplest example of this is a lookup table with vector directions, like:

const vec2 axis_x(1, 0);
const vec2 axis_y(0, 1);
const vec2 LUT[4] = { - axis_x, + axis_x, - axis_y, + axis_y };

@Groovounet Groovounet added the bug label Oct 17, 2015
@Groovounet Groovounet added this to the GLM 0.9.8 milestone Oct 17, 2015
@Groovounet Groovounet self-assigned this Oct 17, 2015
@Groovounet
Copy link
Member

This is a bug. GLSL supports it so GLM should support it too.

Thanks for reporting!
Christophe

Groovounet added a commit that referenced this issue Oct 17, 2015
@Groovounet
Copy link
Member

This bug has been fixed in master branch for GLM 0.9.8 release.

Thanks for contributing,
Christophe

Groovounet added a commit that referenced this issue Jan 3, 2016
Groovounet added a commit that referenced this issue Jan 3, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants