graph: replace custom reverse logic with slices.Reverse

This commit is contained in:
Jonathan Bluett-Duncan
2024-02-03 16:20:43 +00:00
committed by Dan Kortschak
parent 1f5b2b5b54
commit b94e4828e9
12 changed files with 33 additions and 38 deletions

View File

@@ -214,12 +214,6 @@ type moveStructures struct {
tol float64
}
func reverse(f []float64) {
for i, j := 0, len(f)-1; i < j; i, j = i+1, j-1 {
f[i], f[j] = f[j], f[i]
}
}
func hasNegative(f []float64) bool {
for _, v := range f {
if v < 0 {