From ff28fae9b77e6aea8bc6fedcb122da7a188fcbb6 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 26 Dec 2022 14:15:57 -0600 Subject: [PATCH] feat(math): add CMath::fuint_pi --- tempest/math/CMath.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tempest/math/CMath.hpp b/tempest/math/CMath.hpp index 0054a7d..48a8ba8 100644 --- a/tempest/math/CMath.hpp +++ b/tempest/math/CMath.hpp @@ -29,6 +29,10 @@ class CMath { return static_cast(n + 0.5f); } + static uint32_t fuint_pi(float n) { + return static_cast(n + 0.99994999); + } + static float sqrt(float x) { STORM_ASSERT(x >= 0.0f); return ::sqrt(x);