Method: SyMath::Definition::Int#get_variable
- Defined in:
- lib/symath/definition/int.rb
#get_variable(exp) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/symath/definition/int.rb', line 23 def get_variable(exp) if exp.is_a?(SyMath::Operator) and exp.definition.is_function? and exp.definition.args.length > 0 v = exp.definition.args[0] else v = (exp.variables)[0].to_m end return v.to_d end |