文件名称:基于Lua的Hex和浮点数间互相转换的方法
文件大小:1KB
文件格式:ZIP
更新时间:2022-09-08 14:43:30
lua
用lua实现十六进制数和浮点数之间的互转(Little Endian) -- true: Little Endian; false: Big Endian print(hexToFloat('C40C5253', true)) => 902157303808.0 print(hexToFloat('C40C5253', false)) => -561.28631591797 print(floatToHex('902157303808.0', true)) => C40C5253 print(floatToHex('-561.28631591797', false)) => C40C5253
【文件预览】:
HexFloatConversation.lua