From a6d964879fcd1158f8980e2a0a4a0f8f2cce529b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 10 Jan 2016 20:55:26 -0800 Subject: [PATCH] Added ffloor and fceil. --- include/bx/fpumath.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/bx/fpumath.h b/include/bx/fpumath.h index 0763f5b..bd208a9 100644 --- a/include/bx/fpumath.h +++ b/include/bx/fpumath.h @@ -29,9 +29,19 @@ namespace bx return _rad * 180.0f / pi; } + inline float ffloor(float _f) + { + return floorf(_f); + } + + inline float fceil(float _f) + { + return ceilf(_f); + } + inline float fround(float _f) { - return floorf(_f + 0.5f); + return ffloor(_f + 0.5f); } inline float fmin(float _a, float _b)