feat(math): add CMath::fuint_pi

This commit is contained in:
fallenoak 2022-12-26 14:15:57 -06:00
parent 444f05b59a
commit ff28fae9b7
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

View file

@ -29,6 +29,10 @@ class CMath {
return static_cast<uint32_t>(n + 0.5f);
}
static uint32_t fuint_pi(float n) {
return static_cast<uint32_t>(n + 0.99994999);
}
static float sqrt(float x) {
STORM_ASSERT(x >= 0.0f);
return ::sqrt(x);