We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61f34d2 commit 1597c8eCopy full SHA for 1597c8e
UnityPy/helpers/PackedBitVector.py
@@ -82,7 +82,8 @@ def unpack_floats(
82
83
# read as int and cast up to double to prevent loss of precision
84
quantized_f64 = unpack_ints(packed, start, count)
85
- quantized = [x * packed.m_Range + packed.m_Start for x in quantized_f64]
+ scale = packed.m_Range / ((1 << packed.m_BitSize) - 1)
86
+ quantized = [x * scale + packed.m_Start for x in quantized_f64]
87
return reshape(quantized, shape)
88
89
0 commit comments