Replaced log2() function by equivalent

log2() is not available in some standard C library implementations
This commit is contained in:
Ray 2016-12-09 10:15:44 +01:00
parent 377dcb025f
commit d5c0f9d386
1 changed files with 1 additions and 1 deletions

View File

@ -1780,7 +1780,7 @@ void rlglGenerateMipmaps(Texture2D *texture)
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
texture->mipmaps = 1 + (int)floor(log2(MAX(texture->width, texture->height)));
texture->mipmaps = 1 + (int)floor(log(MAX(texture->width, texture->height))/log(2));
#endif
}
else TraceLog(WARNING, "[TEX ID %i] Mipmaps can not be generated", texture->id);