Geo.Utils
SourceSummary
float_to_hex(float, size) | Turns a float into a hex value. The size can either be 32 or 64 |
hex_to_float(hex) | Turns a hex string or an integer of base 16 into its floating point representation |
pad_left(hex, size) | Adds 0’s to the left of hex string |
pad_right(hex, size) | Adds 0’s to the right of hex string |
repeat(char, count) | Repeats the char count number of times |
reverse_byte_order(hex) | Reverses the byte order of the given hex string |
Functions
Turns a float into a hex value. The size can either be 32 or 64.
Turns a hex string or an integer of base 16 into its floating point representation.
Takes an optional endian atom. Either :xdr for big endian or :ndr for little endian. Defaults to :xdr
Geo.Utils.hex_to_float("40000000")
2.0
Geo.Utils.hex_to_float(0x40000000)
2.0
Geo.Utils.hex_to_float("3ff0000000000000")
1.0
Geo.Utils.hex_to_float(0x3ff0000000000000)
1.0