all: clean up lint identified by ruleguard

Ruleguard run with ruleguard -c=0 -rules ruleguard.rules.go ./... from
https://github.com/dgryski/semgrep-go with the following rules inactivated
to reduce noise:

- unconvert for floating point values
- oddcomparisons
- floateq
This commit is contained in:
Dan Kortschak
2021-05-18 20:22:10 +09:30
parent a4975614d9
commit 03398562de
40 changed files with 82 additions and 82 deletions

View File

@@ -402,7 +402,7 @@ func (h Hanowa) Eigenvalues() []complex128 {
if h.N&0x1 != 0 {
panic("lapack: matrix order must be even")
}
n := int(h.N)
n := h.N
ev := make([]complex128, n)
for i := 0; i < n/2; i++ {
ev[2*i] = complex(h.Alpha, float64(-i-1))
@@ -495,7 +495,7 @@ func (t Tris) Matrix() blas64.General {
}
func (t Tris) Eigenvalues() []complex128 {
n := int(t.N)
n := t.N
ev := make([]complex128, n)
for i := range ev {
angle := float64(i+1) * math.Pi / float64(n+1)