Module: Math
- Included in:
- Fractal::Generator
- Defined in:
- lib/core_ext/math.rb
Class Method Summary collapse
Class Method Details
.max(a, b) ⇒ Object
10 11 12 |
# File 'lib/core_ext/math.rb', line 10 def max(a, b) a > b ? a : b end |
.min(a, b) ⇒ Object
14 15 16 |
# File 'lib/core_ext/math.rb', line 14 def min(a, b) a > b ? b : a end |
.pot(x) ⇒ Object
18 19 20 21 22 |
# File 'lib/core_ext/math.rb', line 18 def pot(x) pot = 1 pot *= 2 until pot >= x pot end |