class Ronin::Support::Binary::CTypes::FloatType

Base class for all floating-point types.

Public Class Methods

new(**kwargs) click to toggle source

Initializes the float type.

@param [Hash{Symbol => Object}] kwargs

Additional keyword arguments for {Type#initialize}.

@option kwargs [Integer] :size

The size in bytes of the type.

@option kwargs [:little, :big, nil] :endian

The endian-ness of the integer type.

@option kwargs [String] :pack_string

The String for `Array#pack` or `String#unpack`.
Calls superclass method
# File lib/ronin/support/binary/ctypes/float_type.rb, line 45
def initialize(**kwargs)
  super(signed: true, **kwargs)
end

Public Instance Methods

uninitialized_value() click to toggle source

Returns an uninitialized Float value.

@return [0.0]

# File lib/ronin/support/binary/ctypes/float_type.rb, line 54
def uninitialized_value
  0.0
end