pub fn new(radius: f32) -> FixedRadiusSearch2D<T> {
        let map = HashMap::new();
        FixedRadiusSearch2D {
            // r: radius * 0.5f32,
            inv_r: 1f32 / (radius * 0.5f32),
            r_sqr: radius * radius,
            hm: map,
            length: 0usize,
            is_distance_squared: false,
            dx: [
                -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1,
                2,
            ],
            dy: [
                -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2,
                2,
            ],
        }
    }
/// Creates a new 2-D fixed-radius search structure with the specified radius, containing data of type T.
Creates a new 2-D fixed-radius search structure with the specified radius, containing data of type T.
Creates a new 2 - D fixed - radius search structure with the specified radius containing data of type T .
pub fn new(radius: f32) -> FixedRadiusSearch2D<T> {
        let map = HashMap::new();
        FixedRadiusSearch2D {
            // r: radius * 0.5f32,
            inv_r: 1f32 / (radius * 0.5f32),
            r_sqr: radius * radius,
            hm: map,
            length: 0usize,
            is_distance_squared: false,
            dx: [
                -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1, 2, -2, -1, 0, 1,
                2,
            ],
            dy: [
                -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2,
                2,
            ],
        }
    }
pub fn new ( radius : f32 ) -> FixedRadiusSearch2D < T > { let map = HashMap :: new ( ) ; FixedRadiusSearch2D { // r: radius * 0.5f32, inv_r : 1f32 / ( radius * 0.5f32 ) , r_sqr : radius * radius , hm : map , length : 0usize , is_distance_squared : false , dx : [ - 2 , - 1 , 0 , 1 , 2 , - 2 , - 1 , 0 , 1 , 2 , - 2 , - 1 , 0 , 1 , 2 , - 2 , - 1 , 0 , 1 , 2 , - 2 , - 1 , 0 , 1 , 2 , ] , dy : [ - 2 , - 2 , - 2 , - 2 , - 2 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , ] , } }
Creates a new 2-D fixed-radius search structure with the specified radius, containing data of type T.
Creates a new 2 - D fixed - radius search structure with the specified radius containing data of type T .
radius
f32
radius
f32