Explorar el Código

Merge pull request #31 from sebastianmunity3d/master

fix integer log2 for asmjs
Бранимир Караџић hace 6 años
padre
commit
52312370d5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/bimg_p.h

+ 1 - 1
src/bimg_p.h

@@ -48,7 +48,7 @@ namespace bimg
 		if (_hasMips)
 		if (_hasMips)
 		{
 		{
 			const uint32_t max = bx::max(_width, _height, _depth);
 			const uint32_t max = bx::max(_width, _height, _depth);
-			const uint32_t num = 1 + uint32_t(bx::log2(float(max) ) );
+			const uint32_t num = 1 + uint32_t(bx::log2((int32_t)max) );
 
 
 			return uint8_t(num);
 			return uint8_t(num);
 		}
 		}