byte to float conversion
in
Programming Questions
•
2 years ago
I am receiving a single 4 byte packet via a udp socket that i would like to convert to a floating point value. I had thought i could just use something like;
the method parseFloat(int) is not applicable for the argument. Even though the language reference states that float() will accept a byte array as a parameter.
Is there another way i could go about converting the bytes into a float?
- void receive( byte[] data ) { // <-- default handler
float f = float(data);
print("float: ");
println(f);
}
the method parseFloat(int) is not applicable for the argument. Even though the language reference states that float() will accept a byte array as a parameter.
Is there another way i could go about converting the bytes into a float?
2