Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/ms_abundance_sim.rb
Instance Method Summary collapse
Instance Method Details
#factorial ⇒ Object
23 24 25 26 |
# File 'lib/ms_abundance_sim.rb', line 23 def factorial # https://www.rosettacode.org/wiki/Factorial#Ruby (fastest and most concise) (2..self).reduce(1, :*) end |