mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-09 03:57:51 +03:00
Truncate instead of rounding to deal with negative values
This commit is contained in:
parent
6f5e0e7697
commit
f18b8adfea
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ namespace
|
|||
// Round value to prevent precision issues
|
||||
void truncate(float& value)
|
||||
{
|
||||
value = std::roundf(value * 1024.f) / 1024.f;
|
||||
value = static_cast<int>(value * 1024.f) / 1024.f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue