Module: SymCalc

Defined in:
lib/symcalc.rb

Overview

The SymCalc module implemenets the standard function class creations shorter

Class Method Summary collapse

Class Method Details

.cos(eq) ⇒ Object

cos(equation) is the same as Cos.new(equation), just shorter



827
828
829
# File 'lib/symcalc.rb', line 827

def cos(eq)
  return Cos.new(to_equation(eq))
end

.exp(power) ⇒ Object

exp(equation) is the same as Exp.new(equation), just shorter



842
843
844
# File 'lib/symcalc.rb', line 842

def exp(power)
  return Exp.new(to_equation(power))
end

.ln(eq) ⇒ Object

ln(equation) is the same as Ln.new(equation), just shorter



832
833
834
# File 'lib/symcalc.rb', line 832

def ln(eq)
  return Ln.new(to_equation(eq))
end

.log(base, eq) ⇒ Object

log(base, equation) is the same as Log.new(base, equation), just shorter



837
838
839
# File 'lib/symcalc.rb', line 837

def log(base, eq)
  return Log.new(to_equation(base), to_equation(eq))
end

.sin(eq) ⇒ Object

sin(equation) is the same as Sin.new(equation), just shorter



822
823
824
# File 'lib/symcalc.rb', line 822

def sin(eq)
  return Sin.new(to_equation(eq))
end

.var(name, fixed_value = nil) ⇒ Object

var(name) is the same as Variable.new(name), just shorter



847
848
849
# File 'lib/symcalc.rb', line 847

def var(name, fixed_value=nil)
  Variable.new name, fixed_value
end