Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/tor257/Integer.rb

Instance Method Summary collapse

Instance Method Details

#ror(count, size = 32) ⇒ Object



3
4
5
6
# File 'lib/tor257/Integer.rb', line 3

def ror count, size=32
  count = count % size
  ((self >> count) | (self << (size - count))) & (2**size-1)
end