Rename parameter to other

This commit is contained in:
Jan Bader 2022-02-19 21:28:18 +00:00
parent daadfd45bc
commit 0f2501dcbd

View File

@ -54,13 +54,13 @@ func (n Numeric) MatchExp(exp int32) Numeric {
}} }}
} }
func (n Numeric) Sub(o Numeric) Numeric { func (n Numeric) Sub(other Numeric) Numeric {
left := n left := n
right := o right := other
if n.Exp < o.Exp { if n.Exp < other.Exp {
right = o.MatchExp(n.Exp) right = other.MatchExp(n.Exp)
} else if n.Exp > o.Exp { } else if n.Exp > other.Exp {
left = n.MatchExp(o.Exp) left = n.MatchExp(other.Exp)
} }
if left.Exp == right.Exp { if left.Exp == right.Exp {
@ -73,13 +73,13 @@ func (n Numeric) Sub(o Numeric) Numeric {
panic("Cannot subtract with different exponents") panic("Cannot subtract with different exponents")
} }
func (n Numeric) Add(o Numeric) Numeric { func (n Numeric) Add(other Numeric) Numeric {
left := n left := n
right := o right := other
if n.Exp < o.Exp { if n.Exp < other.Exp {
right = o.MatchExp(n.Exp) right = other.MatchExp(n.Exp)
} else if n.Exp > o.Exp { } else if n.Exp > other.Exp {
left = n.MatchExp(o.Exp) left = n.MatchExp(other.Exp)
} }
if left.Exp == right.Exp { if left.Exp == right.Exp {