Module: Random::NumericExtensions
- Included in:
- Numeric
- Defined in:
- lib/standard/facets/random.rb
Overview
Random extensions for Numeric class.
Instance Method Summary collapse
Instance Method Details
#random_delta(last, exclude_end) ⇒ Object
116 117 118 119 120 121 |
# File 'lib/standard/facets/random.rb', line 116 def random_delta(last, exclude_end) first = self return nil if last < first return nil if exclude_end && last == first return (last - first) * Random.number + first end |