kdbush
A static spacial index for 2D points in V. This is a V port of
kdbush Go
Install
v install impopular-guy.kdbush
Usage
import impopular_guy.kdbush
interface Point
interface Point {
coordinates() (f64, f64)
}
You can use objects that implements Point interface or you can also use
kdbush.SimplePoint
KDBush.new
fn KDBush.new(points []Point, node_size int) &KDBush
KDBush.new
It takes the following inputs:
points
node_size
range
fn (bush KDBush) range(minX f64, minY f64, maxX f64, maxY f64) []int
range
within
fn (bush KDBush) within(qx f64, qy f64, radius f64) []int
within
LICENSE
MIT