Conversion to float array
andreas.raab at gmx.de
Sun Jan 1 21:51:13 UTC 2006
Convert these bytes into a 32 bit integer first (e.g., with endian
conversion if necessary) and then use Float fromIEEE32Bit: value. And
that is of course assuming that your 32bit floats are in IEEE 754 format.
Cowdery, Bob [UK] wrote:
> I am reading a sequence of bytes from a pipe. The data is actually 32
> bit float values. Is there an easy and efficient way to convert the byte
> array to a float array. Just doing asFloatArray not surprisingly gives
> me an array with each byte converted to a float and what I want is each
> 4 bytes converted to a float.
> Any help appreciated.
> *** Confidentiality Notice *** Proprietary/Confidential
> Information belonging to CGI Group Inc. and its affiliates
> may be contained in this message. If you are not a recipient
> indicated or intended in this message (or responsible for
> delivery of this message to such person), or you think for
> any reason that this message may have been addressed to you
> in error, you may not use or copy or deliver this message
> to anyone else. In such case, you should destroy this
> message and are asked to notify the sender by reply email.
More information about the Squeak-dev