Module: Algebra::MPolynomialConvertTo

Defined in:
lib/algebra/polynomial-converter.rb

Instance Method Summary collapse

Instance Method Details

#convert_to(other) ⇒ Object



54
55
56
57
58
59
60
61
# File 'lib/algebra/polynomial-converter.rb', line 54

def convert_to(other)
  if other <= Polynomial
    # Polynomial.create(ground, *(variables))
    Polynomial.create(ground, *variables.reverse)
  else
    raise "unkown self.class (#{other})"
  end
end