feat(math): add CMath::fint

This commit is contained in:
fallenoak 2022-12-26 14:11:24 -06:00
parent c6a7e2c771
commit 9987c5522b
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

View file

@ -13,6 +13,10 @@ class CMath {
static constexpr float OO_TWO_PI = 1.0f / TWO_PI; static constexpr float OO_TWO_PI = 1.0f / TWO_PI;
// Static functions // Static functions
static int32_t fint(float n) {
return static_cast<int32_t>(n);
}
static uint32_t fuint(float n) { static uint32_t fuint(float n) {
return static_cast<uint32_t>(n); return static_cast<uint32_t>(n);
} }