llFloatToBase64 and llBase64ToFloat
Chaser Zaks
(Contributor agreement
should
cover this, I think?)I requested this on the Jira back when it was around, but it was closed due to endianness issues on various machines.
I've written a implementation that packs the float into base64, and visa versa, regardless of endianness.
It currently encodes in big-endian, which llIntegerToBase64 and llBase64ToInteger do.
It would be really useful if we need to preserve floating point values in a short string.
Benefits of this over doing (string) for floats is that:
- Extremely precise floats don't end up like 1.258532194328154328
- LSL cuts off floating point precision after the 5th precision (EG: 0.12345 instead of 0.1234567890)
Log In