From 8f024e159807b3d4e98c474636fda2b555a364e2 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 20 Jan 2020 17:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0pow22=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/math/FastTriangle.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/inc/hgl/math/FastTriangle.h b/inc/hgl/math/FastTriangle.h index 2f626c0..a02165b 100644 --- a/inc/hgl/math/FastTriangle.h +++ b/inc/hgl/math/FastTriangle.h @@ -22,12 +22,10 @@ namespace hgl /** * 近似Pow2.2,使用此函数等于pow(x,2.2) - * The MIT License - * Copyright © 2019 Inigo Quilez */ - double inline ApproxPow22(double x) + double inline LPow22(double x) { - return ((exp2(x)-1.0)-x*0.693147)*3.258891; + return x*(1.12*x - 0.12); } }//namespace hgl #endif//HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE