summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README5
-rw-r--r--wipesides.go3
2 files changed, 8 insertions, 0 deletions
diff --git a/README b/README
index 8938e43..68b4320 100644
--- a/README
+++ b/README
@@ -10,6 +10,11 @@ by running `go get rescribe.xyz/preproc/...` and documentation
can be read with the `go doc` command or online at
<https://pkg.go.dev/rescribe.xyz/preproc>.
+If you just want to install and use the commands, you can get the
+package with `git clone https://git.rescribe.xyz/preproc`, and then
+install them with `go install ./...` from within the `preproc`
+directory.
+
## Commands
There are several commands in the cmd/ directory which are useful
diff --git a/wipesides.go b/wipesides.go
index 9183479..b9f5e5c 100644
--- a/wipesides.go
+++ b/wipesides.go
@@ -55,6 +55,9 @@ func findbestedge(img SummableImage, x int, w int) int {
bestxs = append(bestxs, x)
}
}
+ if len(bestxs) == 0 {
+ return 0
+ }
middlex := bestxs[len(bestxs)/2]
return middlex