I have not been able to convert something like this:
byte[] b = new byte[] { 12, 24, 19, 17};
into something like this:
float myfloatvalue = ?;
Could someone please give me an example?
Also how to turn that float back to bytes?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From
byte[]->float, you could do:Here is an alternative to using
ByteBuffer.allocatefor convertingfloat->byte[]: