This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts a DataView that represents a 4 byte float (IEEE-11073) | |
* to an actual float. Useful for example when reading temperature | |
* from a Bluetooth thermometer :) | |
* | |
* The DataView buffer should contain at least 4 bytes: | |
* | |
* [b0, b1, b2, b3] | |
* ^ ^ ^ └---------- Exponent | |
* └---└---└------- Will become the mantissa |