1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 07:09:42 +00:00

Round to a power of two

This commit is contained in:
Evil Eye 2021-10-23 09:29:16 +02:00
parent dd4d8b2649
commit b5c876299d

View file

@ -11,7 +11,7 @@ namespace
// Round value to prevent precision issues
void truncate(float& value)
{
value = std::roundf(value * 1000.f) / 1000.f;
value = std::roundf(value * 1024.f) / 1024.f;
}
}