diff --git a/src/RawModel.cpp b/src/RawModel.cpp index f9ffee7..8b3e134 100644 --- a/src/RawModel.cpp +++ b/src/RawModel.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #if defined( __unix__ ) @@ -21,11 +22,6 @@ #include "utils/Image_Utils.h" #include "RawModel.h" -static float Log2f(float f) -{ - return logf(f) * 1.442695041f; -} - bool RawVertex::operator==(const RawVertex &other) const { return (position == other.position) && @@ -101,7 +97,7 @@ int RawModel::AddTexture(const std::string &name, const std::string &fileName, c texture.name = name; texture.width = properties.width; texture.height = properties.height; - texture.mipLevels = (int) ceilf(Log2f(std::max((float) properties.width, (float) properties.height))); + texture.mipLevels = (int) ceilf(log2f(std::max((float) properties.width, (float) properties.height))); texture.usage = usage; texture.occlusion = (properties.occlusion == IMAGE_TRANSPARENT) ? RAW_TEXTURE_OCCLUSION_TRANSPARENT : RAW_TEXTURE_OCCLUSION_OPAQUE;