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;
void receive( byte[] data ) { // <-- default handler
float f = float(data);
print("float: ");
println(f); }
However when i run it i receive an error stating;
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?