From 75d89283d5ba2a97e02ada50dc800fd65b601b7b Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Mon, 30 Apr 2018 04:50:00 -0700 Subject: [PATCH] Added comment about Nearby dist param closes #31 --- buntdb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buntdb.go b/buntdb.go index b2ec7e3..35f8520 100644 --- a/buntdb.go +++ b/buntdb.go @@ -1816,6 +1816,8 @@ func (r *rect) Rect(ctx interface{}) (min, max []float64) { // is represented by the rect string. This string will be processed by the // same bounds function that was passed to the CreateSpatialIndex() function. // An invalid index will return an error. +// The dist param is the distance of the bounding boxes. In the case of +// simple 2D points, it's the distance of the two 2D points squared. func (tx *Tx) Nearby(index, bounds string, iterator func(key, value string, dist float64) bool) error { if tx.db == nil {