I understand this question is oddly phrased, so let me explain with 2 examples.
Example 1
The code below turns the series of values [64, 176, 0, 86, 68, 97, 136, 8]
into the float 4096.336980910979
.
(new DataView(new Uint8Array([64, 176, 0, 86, 68, 97, 136, 8]).buffer)).getFloat64();
/*Output 4096.336980910979*/
How do I reverse it to get the series of values [64, 176, 0, 86, 68, 97, 136, 8]
when I input the float 4096.336980910979
?
Example 2:
The code below turns the series of values [70, 253, 192, 0]
into the float 32480
.
(new DataView(new Uint8Array([70, 253, 192, 0]).buffer)).getFloat32();
/*Output 32480*/
How do I reverse it to get the series of values [70, 253, 192, 0]
when I input the float 32480
?