optimize/functions: use ++ and -- operators

This commit is contained in:
Vladimir Chalupecky
2017-06-16 22:37:47 +02:00
parent a606d7a1eb
commit 985bce8af2

View File

@@ -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]++
}
}