Added log2 for int types

This commit is contained in:
Christophe Riccio
2011-10-13 18:36:44 +01:00
parent c4af12634b
commit 16ef34f9c5
5 changed files with 124 additions and 17 deletions

View File

@@ -60,7 +60,8 @@ namespace glm
//! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size.
//! From GLM_GTX_integer extension.
unsigned int log2(unsigned int x);
template <typename genType>
genType log2(genType const & x);
//! Returns the floor log2 of x.
//! From GLM_GTX_integer extension.