Added comment about Nearby dist param

closes #31
This commit is contained in:
Josh Baker 2018-04-30 04:50:00 -07:00
parent 6c62c87570
commit 75d89283d5
1 changed files with 2 additions and 0 deletions

View File

@ -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 // is represented by the rect string. This string will be processed by the
// same bounds function that was passed to the CreateSpatialIndex() function. // same bounds function that was passed to the CreateSpatialIndex() function.
// An invalid index will return an error. // 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, func (tx *Tx) Nearby(index, bounds string,
iterator func(key, value string, dist float64) bool) error { iterator func(key, value string, dist float64) bool) error {
if tx.db == nil { if tx.db == nil {