From b83ed0b79e7072238f8925e785ce488c2f18da1f Mon Sep 17 00:00:00 2001 From: wy Date: Sun, 10 Dec 2023 03:23:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20log2=20=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/egejulia.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/demo/egejulia.cpp b/demo/egejulia.cpp index 2f11f202..be806fd4 100644 --- a/demo/egejulia.cpp +++ b/demo/egejulia.cpp @@ -5,10 +5,6 @@ * (编译后改为scr后缀使用) */ -#ifdef _CRT_FUNCTIONS_REQUIRED -#undef _CRT_FUNCTIONS_REQUIRED /// 解决在高版本 visual studio中, log2 与系统定义的版本冲突的问题 -#endif - #include "graphics.h" #include #include @@ -97,7 +93,7 @@ const double gc_lb = log(2.0); * @param d 指数 * @return 对数值 */ -double log2(double d) { +double myLog2(double d) { return log(d) / gc_lb; } @@ -109,7 +105,7 @@ void InitLog() for (int i=0; i<(18 * 18) * 32; ++i) { double r = i / col_ins; - logmap[i] = 1 - log2(log2(r)/2); + logmap[i] = 1 - myLog2(myLog2(r)/2); } }