summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-02-08 14:59:10 +0000
committerNick White <git@njw.name>2021-02-08 14:59:10 +0000
commitde17e27799e372b5056814550c344f6a62353128 (patch)
tree1e3e003192d3e90c7921022fa706ce640d9849d7
parent34dda838f09cd3c9d95d435e8fa8ac446401843f (diff)
parentb992e8482c6302af8e804c1b065ba8b8016561bb (diff)
Merge branch 'master' of https://git.rescribe.xyz/preproc
-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