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