summaryrefslogtreecommitdiff
path: root/integralimg_test.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-08-03 15:57:34 +0100
committerNick White <git@njw.name>2020-08-03 15:57:34 +0100
commiteca5854cfec5ec4a13312bd5fdae81f66be3a673 (patch)
tree3265e8e348129664f70b444f6abb48ab6a013650 /integralimg_test.go
parenta7fca431e4eceb5523943e14620e1f2f2f563aed (diff)
gofmt
Diffstat (limited to 'integralimg_test.go')
-rw-r--r--integralimg_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/integralimg_test.go b/integralimg_test.go
index ccc6fc2..885ff61 100644
--- a/integralimg_test.go
+++ b/integralimg_test.go
@@ -81,7 +81,7 @@ func TestSum(t *testing.T) {
{"small2", image.Rect(0, 0, 4, 4)},
}
- for _, c := range cases{
+ for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
sumimg := imgplus.sum(c.r)
sumint := integral.Sum(c.r)
@@ -121,7 +121,7 @@ func TestMean(t *testing.T) {
{"small2", image.Rect(0, 0, 4, 4)},
}
- for _, c := range cases{
+ for _, c := range cases {
t.Run(c.name, func(t *testing.T) {
meanimg := imgplus.mean(c.r)
meanint := integral.Mean(c.r)
@@ -181,5 +181,5 @@ func (i grayPlus) sum(r image.Rectangle) uint64 {
func (i grayPlus) mean(r image.Rectangle) float64 {
in := r.Intersect(i.Bounds())
- return float64(i.sum(r)) / float64(in.Dx() * in.Dy())
+ return float64(i.sum(r)) / float64(in.Dx()*in.Dy())
}