From 072f574c0267458addb70ad0b158069f49900c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 4 Dec 2015 22:36:08 -0800 Subject: [PATCH] Added fpow, fexp2, flog, flog2. --- include/bx/fpumath.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/bx/fpumath.h b/include/bx/fpumath.h index 80b0aaf..e40fd26 100644 --- a/include/bx/fpumath.h +++ b/include/bx/fpumath.h @@ -104,6 +104,26 @@ namespace bx return cosf(_a); } + inline float fpow(float _a, float _b) + { + return powf(_a, _b); + } + + inline float fexp2(float _a) + { + return fpow(2.0f, _a); + } + + inline float flog(float _a) + { + return logf(_a); + } + + inline float flog2(float _a) + { + return flog(_a) * 1.442695041f; + } + inline float fsqrt(float _a) { return sqrtf(_a);