ID:167698
 
How does byond use floating point numbers? I read it was a 4 byte big endian. Yet when I return the value 2 over sockets I recieve. 0x00 0x00 0x00 0x64. Which would be some strange number in 32 bit floating point.... a 2 should look something like 0x40 0x00 0x00 0x00.. At least thats what Im use to. So if someone could provide me some insight on this, it would be great.
DoOmBringer wrote:
How does byond use floating point numbers? I read it was a 4 byte big endian. Yet when I return the value 2 over sockets I recieve. 0x00 0x00 0x00 0x64. Which would be some strange number in 32 bit floating point.... a 2 should look something like 0x40 0x00 0x00 0x00.. At least thats what Im use to. So if someone could provide me some insight on this, it would be great.

I suspect your actual values are 0 0 0 64, or 0x00 0x00 0x00 0x40, not what you described.

Ultimately though I don't see the point in your question. What does the format matter, unless you're trying to develop or configure a packet sender? Version 347 is designed to put an end to their use. As more people begin using it, and as authors (and eventually, hosts) limit people to using 347+, malicious packets should be a thing of the past.

Lummox JR