mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 12:45:38 +00: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…
Reference in a new issue