From ff44ec7b7a1098e4f5d8748a6902017f6ee8c542 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 30 Apr 2023 15:55:20 +0200 Subject: [PATCH] source/Math/Logarithm.cpp: c++11/C99 has log2 in cmath. not sure why i didnt use it. --- source/Math/Logarithm.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/Math/Logarithm.cpp b/source/Math/Logarithm.cpp index 9aa7f03..4fe83eb 100644 --- a/source/Math/Logarithm.cpp +++ b/source/Math/Logarithm.cpp @@ -5,8 +5,6 @@ namespace sp { -#define LOG2INBASE10 0.30102999566f - double math::log(double base, double value) { return ::log10(value) / ::log10(base); @@ -14,7 +12,7 @@ double math::log(double base, double value) { double math::log2(double value) { - return ::log10(value) / LOG2INBASE10; + return ::log2(value); } } // namespace sp