Class: Depix::Binary::Fields::R32Field

Inherits:
Field
  • Object
show all
Defined in:
lib/depix/binary/fields.rb

Overview

real32 field

Constant Summary collapse

BLANK =
0xFFFFFFFF

Instance Attribute Summary

Attributes inherited from Field

#desc, #name, #req

Instance Method Summary collapse

Methods inherited from Field

#consume!, #explain, #initialize, #pack, #validate!

Constructor Details

This class inherits a constructor from Depix::Binary::Fields::Field

Instance Method Details

#clean(v) ⇒ Object



165
166
167
# File 'lib/depix/binary/fields.rb', line 165

def clean(v)
  v.nan? ? nil : v
end

#lengthObject



169
170
171
# File 'lib/depix/binary/fields.rb', line 169

def length
  4
end

#patternObject



161
162
163
# File 'lib/depix/binary/fields.rb', line 161

def pattern
  "g"
end

#rtypeObject



173
174
175
# File 'lib/depix/binary/fields.rb', line 173

def rtype
  Float
end