Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use kd_tree::KdPoint;

pub(crate) struct Item {
    pub(crate) point: [f64; 3],
    pub(crate) id: usize,
}

impl KdPoint for Item {
    type Scalar = f64;
    type Dim = typenum::U3;

    fn at(&self, k: usize) -> f64 {
        self.point[k]
    }
}