Skip to content
This repository was archived by the owner on Jul 20, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (17 loc) · 437 Bytes

File metadata and controls

24 lines (17 loc) · 437 Bytes

HexToFloat

Take a hex input and convert it to a float.

Configuration

interface IHexToFloatConfig {
  endianness?: Endianness;
}

enum Endianness {
  LITTLE_ENDIAN = "le",
  BIG_ENDIAN = "be",
}

Example

const hexToFloatDefault = Mappers.hexToFloat(); // HexToFloat: endianness:"be"

const hexToFloatLittleEndian = Mappers.hexToFloat({ endianness: Endianness.LITTLE_ENDIAN }) // HexToFloat: endianness:"le"