Module: TBMX::MathFunctions

Defined in:
lib/tbmx.rb

Class Method Summary collapse

Class Method Details

.degrees2radians(degrees) ⇒ Object



48
49
50
# File 'lib/tbmx.rb', line 48

def degrees2radians degrees
  degrees * Math::PI / 180.0
end

.lgamma(n) ⇒ Object



52
53
54
# File 'lib/tbmx.rb', line 52

def lgamma n
  Math::lgamma(n).first
end

.radians2degrees(radians) ⇒ Object



56
57
58
# File 'lib/tbmx.rb', line 56

def radians2degrees radians
  radians * 180.0 / Math::PI
end