fix 1x being printed instead of x
This commit is contained in:
@@ -203,7 +203,7 @@ module RubyAlgebra
|
||||
end
|
||||
|
||||
def to_s
|
||||
result = coeff.to_s
|
||||
result = @coeff != 1 ? @coeff.to_s : ''
|
||||
unless @variables.empty?
|
||||
first = true
|
||||
@variables.each do |var, power|
|
||||
|
||||
Reference in New Issue
Block a user