add ApproxPow22
This commit is contained in:
@@ -19,5 +19,15 @@ namespace hgl
|
|||||||
}
|
}
|
||||||
|
|
||||||
double Latan2(double y, double x); ///<低精度atan2函数
|
double Latan2(double y, double x); ///<低精度atan2函数
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 近似Pow2.2,使用此函数等于pow(x,2.2)
|
||||||
|
* The MIT License
|
||||||
|
* Copyright © 2019 Inigo Quilez
|
||||||
|
*/
|
||||||
|
double inline ApproxPow22(double x)
|
||||||
|
{
|
||||||
|
return ((exp2(x)-1.0)-x*0.693147)*3.258891;
|
||||||
|
}
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
#endif//HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE
|
#endif//HGL_ALGORITHM_MATH_FAST_TRIANGLE_FUNCTION_INCLUDE
|
||||||
|
Reference in New Issue
Block a user