Method: ErlangBitstream#add_int
- Defined in:
- lib/utils/erlang_parser.rb
#add_int(v, size) ⇒ Object
133 134 135 136 |
# File 'lib/utils/erlang_parser.rb', line 133 def add_int(v, size) x = v.to_i & (2**size - 1) # only get the bits specified in size add_bits(int2bits(x, size)) end |