lua_numbers in NS2
<div class="IPBDescription">single or double?</div>Lately I stumbled over the fact that Vectors in NS2 are only 16 bytes long. Since a lua_number is a double precision float by default (8 bytes) but can be modified before compiling the Lua library, I'm wondering if the devs have actually done that, because a Vector would have to store 3 numbers. (24 bytes if double, 12 bytes if single). Since most data I have to save for my project are numbers, it would almost cut the file size half if I could "savely"(no data loss) save single instead of double precision floats.
Comments