Module: Math
- Defined in:
- lib/tonal/extensions.rb
Constant Summary collapse
- PHI =
(1 + 5**(1.0/2))/2
Class Method Summary collapse
-
.factorial(limit) ⇒ Integer
The factorial of n.
Class Method Details
.factorial(limit) ⇒ Integer
Returns the factorial of n.
401 |
# File 'lib/tonal/extensions.rb', line 401 def self.factorial(limit) = (2..limit).reduce(1, :*) |