-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
glm::min / max difference behavior than std::min / max #372
Comments
fmin and fmax are C++11 only features which makes it hard to generalize to GLM. I guess adding an extension exposing vector flavors or fmin and fmax could be nice. If you carefully using your NaN vectors, that is to say, you are never doing any arithmetic on them, I guess it's not too bad. However, I would not consider it as a great coding practice. Thanks, |
I was checking, there is a c99 fminf and fmaxf but I didn't test if the behaviour is the same. |
This issue is fixed in master branch for GLM 0.9.9 release. Better now than never XD. Thanks for reporting, |
Hello!
I am using float NAN to initialize my float vectors. In accord to the float.h from gnu builder, I found that it is expected that fmin fmax in the presence of a non number will choose the number.
i.e:
fmin( nan, value) == value
fmax( nan, value) == value
But it looks like the glm::min / max is not behaving the same. is it supposed?
Btw, is that too bad that I use a NAN to set the vector "not initialized" ?
The text was updated successfully, but these errors were encountered: