diff options
author | Nick White <git@njw.name> | 2019-05-14 10:30:35 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-05-14 10:30:35 +0100 |
commit | 2946ba02f25a7ae605464031099580b3ae2ce22c (patch) | |
tree | 292ff2ed50ae5731d20ec8e8a5f5b57c950ea8de /preproc/util.go | |
parent | 3b12c59f37f0dc58ad1886052c03f4c81a2a5b78 (diff) |
gofmt
Diffstat (limited to 'preproc/util.go')
-rw-r--r-- | preproc/util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/preproc/util.go b/preproc/util.go index 5f8a9f1..e23829d 100644 --- a/preproc/util.go +++ b/preproc/util.go @@ -29,7 +29,7 @@ func stddev(i []int) float64 { for _, n := range i { sum += (float64(n) - m) * (float64(n) - m) } - variance := sum / float64(len(i) - 1) + variance := sum / float64(len(i)-1) return math.Sqrt(variance) } @@ -40,7 +40,7 @@ func meanstddev(i []int) (float64, float64) { for _, n := range i { sum += (float64(n) - m) * (float64(n) - m) } - variance := float64(sum) / float64(len(i) - 1) + variance := float64(sum) / float64(len(i)-1) return m, math.Sqrt(variance) } @@ -77,7 +77,7 @@ func surrounding(img *image.Gray, x int, y int, size int) []int { func BinToZeroInv(bin *image.Gray, orig *image.RGBA) (*image.RGBA, error) { b := bin.Bounds() - if ! b.Eq(orig.Bounds()) { + if !b.Eq(orig.Bounds()) { return orig, errors.New("bin and orig images need to be the same dimensions") } newimg := image.NewRGBA(image.Rect(0, 0, b.Dx(), b.Dy())) |