1
0
Fork 0

source/Math/Logarithm.cpp: c++11/C99 has log2 in cmath. not sure why i didnt use it.

This commit is contained in:
Henrik Hautakoski 2023-04-30 15:55:20 +02:00
parent c1cc476094
commit ff44ec7b7a

View file

@ -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