Module: Math

Defined in:
lib/mack-facets/extensions/math.rb

Class Method Summary collapse

Class Method Details

.log2(x) ⇒ Object



3
4
5
# File 'lib/mack-facets/extensions/math.rb', line 3

def self.log2(x)
   self.log(x)/self.log(2.0)
end

.max(a, b) ⇒ Object



11
12
13
# File 'lib/mack-facets/extensions/math.rb', line 11

def self.max(a, b)
   a > b ? a : b
end

.min(a, b) ⇒ Object



7
8
9
# File 'lib/mack-facets/extensions/math.rb', line 7

def self.min(a, b)
   a < b ? a : b
end