gurki / vivid

A simple-to-use cpp color library
MIT License
167 stars 17 forks source link

Use correct standard library math functions, add missing header includes #5

Closed mdcurtis closed 5 years ago

mdcurtis commented 5 years ago

With these changes, the project successfully builds against GCC 6 (boost::optional is required as a substitute for older compilers/language versions, but this is a drop-in replacement and the project otherwise builds fine and tests pass).

The 'f' suffixed variants of the math functions are actually a C-ism and are not part of the std namespace. Moreover, the std-namespace versions are better as they automatically choose the correct overload based on input type.

mdcurtis commented 5 years ago

Done. I also have another couple of changes in the works: using cstdint (it seems glm 0.9.9.6 removed an accidental stdint.h include); and installation on Linux if you're interested in those.