mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 02:22:30 +00:00
feat(math): add CMath::fint_n
This commit is contained in:
parent
9987c5522b
commit
444f05b59a
1 changed files with 4 additions and 0 deletions
|
|
@ -17,6 +17,10 @@ class CMath {
|
||||||
return static_cast<int32_t>(n);
|
return static_cast<int32_t>(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t fint_n(float n) {
|
||||||
|
return n <= 0.0f ? static_cast<int32_t>(n - 0.5f) : static_cast<int32_t>(n + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
static uint32_t fuint(float n) {
|
static uint32_t fuint(float n) {
|
||||||
return static_cast<uint32_t>(n);
|
return static_cast<uint32_t>(n);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue