Method: Object#rand_in_floats

Defined in:
lib/just_enumerable_stats.rb

#rand_in_floats(a, b) ⇒ Object

Handles non-integers



26
27
28
29
# File 'lib/just_enumerable_stats.rb', line 26

def rand_in_floats(a, b)
  range = (a - b).abs
  (rand * range) + [a,b].min
end