module Argus::FloatEncoding
Public Instance Methods
decode_float(encoded_float)
click to toggle source
# File lib/argus/float_encoding.rb 9 def decode_float(encoded_float) 10 [encoded_float].pack("l>").unpack("g").first 11 end
encode_float(float)
click to toggle source
# File lib/argus/float_encoding.rb 5 def encode_float(float) 6 [float].pack('g').unpack("l>").first 7 end