From 7eb2b5ea2ff5c629b366cda0c33b97f65c912c1f Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Fri, 25 Nov 2022 17:51:24 -0500 Subject: [PATCH] Removed the weird way to create negatives You can just press s it's fine --- calculate.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/calculate.go b/calculate.go index 3c50b24..6233cc7 100644 --- a/calculate.go +++ b/calculate.go @@ -193,13 +193,6 @@ func (operation *Operation) inexactSolution () (solution float64, err error) { } case OpcodeSubtract: - if len(operation.operands) == 1 { - solution, err = operation.operands[0].InexactSolution() - solution *= -1 - if err != nil { return } - break - } - for index, operand := range operation.operands { subSolution, err = operand.InexactSolution() if err != nil { return }