blas/gonum: clean up unnecessary indentation
MODIFY
blas/gonum/level1double.go
blas/gonum/level1double.go
@@ -341,11 +341,13 @@ func (Implementation) Drotmg(d1, d2, x1, y1 float64) (p blas.DrotmParams, rd1, r
return p, 0, 0, 0
}
- var h11, h12, h21, h22 float64
if d2 == 0 || y1 == 0 {
p.Flag = blas.Identity
return p, d1, d2, x1
- } else if (d1 == 0 || x1 == 0) && d2 > 0 {
+ }
+
+ var h11, h12, h21, h22 float64
+ if (d1 == 0 || x1 == 0) && d2 > 0 {
p.Flag = blas.Diagonal
h12 = 1
h21 = -1
@@ -366,16 +368,17 @@ func (Implementation) Drotmg(d1, d2, x1, y1 float64) (p blas.DrotmParams, rd1, r
if u <= 0 {
p.Flag = blas.Rescaling // Error state.
return p, 0, 0, 0
- } else {
+ }
+
d1 /= u
d2 /= u
x1 *= u
- }
} else {
if q2 < 0 {
p.Flag = blas.Rescaling // Error state.
return p, 0, 0, 0
- } else {
+ }
+
p.Flag = blas.Diagonal
h21 = -1
h12 = 1
@@ -386,7 +389,6 @@ func (Implementation) Drotmg(d1, d2, x1, y1 float64) (p blas.DrotmParams, rd1, r
x1 = y1 * u
}
}
- }
for d1 <= rgamsq && d1 != 0 {
p.Flag = blas.Rescaling

MODIFY
blas/gonum/level1single.go
blas/gonum/level1single.go
@@ -359,11 +359,13 @@ func (Implementation) Srotmg(d1, d2, x1, y1 float32) (p blas.SrotmParams, rd1, r
return p, 0, 0, 0
}
- var h11, h12, h21, h22 float32
if d2 == 0 || y1 == 0 {
p.Flag = blas.Identity
return p, d1, d2, x1
- } else if (d1 == 0 || x1 == 0) && d2 > 0 {
+ }
+
+ var h11, h12, h21, h22 float32
+ if (d1 == 0 || x1 == 0) && d2 > 0 {
p.Flag = blas.Diagonal
h12 = 1
h21 = -1
@@ -384,16 +386,17 @@ func (Implementation) Srotmg(d1, d2, x1, y1 float32) (p blas.SrotmParams, rd1, r
if u <= 0 {
p.Flag = blas.Rescaling // Error state.
return p, 0, 0, 0
- } else {
+ }
+
d1 /= u
d2 /= u
x1 *= u
- }
} else {
if q2 < 0 {
p.Flag = blas.Rescaling // Error state.
return p, 0, 0, 0
- } else {
+ }
+
p.Flag = blas.Diagonal
h21 = -1
h12 = 1
@@ -404,7 +407,6 @@ func (Implementation) Srotmg(d1, d2, x1, y1 float32) (p blas.SrotmParams, rd1, r
x1 = y1 * u
}
}
- }
for d1 <= rgamsq && d1 != 0 {
p.Flag = blas.Rescaling

blas/gonum: clean up unnecessary indentation