Skip to content

Commit

Permalink
optimize/functions: use ++ and -- operators
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-ch committed Jun 16, 2017
1 parent a80ce34 commit ec71e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimize/functions/functions.go
Expand Up @@ -1766,11 +1766,11 @@ func (f Plassmann) Grad(grad, x []float64) {
grad[0] = (1 - b) * math.Cos(l*math.Pi/2*a)
switch {
case a <= 1-b:
grad[0] -= 1
grad[0]--
case 1-b < a && a <= 1+b:
grad[0] += (a - 1) / b
default: // a > 1+b
grad[0] += 1
grad[0]++
}
}

Expand Down

0 comments on commit ec71e0d

Please sign in to comment.