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

.abs(eq) ⇒ Object

abs(equation) is the same as Abs.new(equation), just shorter



989
990
991
# File 'lib/symcalc.rb', line 989

def abs eq
  return Abs.new(to_equation(eq))
end

.cos(eq) ⇒ Object

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



964
965
966
# File 'lib/symcalc.rb', line 964

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

.exp(power) ⇒ Object

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



979
980
981
# File 'lib/symcalc.rb', line 979

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

.ln(eq) ⇒ Object

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



969
970
971
# File 'lib/symcalc.rb', line 969

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



974
975
976
# File 'lib/symcalc.rb', line 974

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



959
960
961
# File 'lib/symcalc.rb', line 959

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



984
985
986
# File 'lib/symcalc.rb', line 984

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