Module: Math
- Defined in:
- lib/sixarm_ruby_ramp/math.rb
Overview
Math extensions
Class Method Summary collapse
-
.ln(num) ⇒ Float
The natural log of num.
-
.logn(num, base) ⇒ Float
The log of num in base base.
Class Method Details
.ln(num) ⇒ Float
Returns the natural log of num.
14 15 16 |
# File 'lib/sixarm_ruby_ramp/math.rb', line 14 def Math.ln(num) Math.log(num) end |
.logn(num, base) ⇒ Float
Returns the log of num in base base.
25 26 27 |
# File 'lib/sixarm_ruby_ramp/math.rb', line 25 def Math.logn(num,base) Math.ln(num)/Math.ln(base) end |