Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/mext/numeric/rrand.rb

Instance Method Summary collapse

Instance Method Details

#rrand(upper = 0) ⇒ Object



27
28
29
30
# File 'lib/mext/numeric/rrand.rb', line 27

def rrand(upper = 0)
  res = super(upper)
  upper.is_a?(Integer) ? res.round : res
end