mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-16 16:20:53 +00:00
Truncate instead of rounding to deal with negative values
This commit is contained in:
parent
6f5e0e7697
commit
f18b8adfea
@ -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…
x
Reference in New Issue
Block a user