Method: LEON::StringBuffer.complement
- Defined in:
- lib/string-buffer.rb
.complement(v, bits) ⇒ Object
111 112 113 |
# File 'lib/string-buffer.rb', line 111 def self.complement(v, bits) return (v ^ ((1 << bits) - 1)) + 1 end |
111 112 113 |
# File 'lib/string-buffer.rb', line 111 def self.complement(v, bits) return (v ^ ((1 << bits) - 1)) + 1 end |