pub fn uniform_grid_spacer(spacer: impl Fn(GridInput) -> [f64; 3] + 'static) -> GridSpacer {
    let get_marks = move |input: GridInput| -> Vec<GridMark> {
        let bounds = input.bounds;
        let step_sizes = spacer(input);
        generate_marks(step_sizes, bounds)
    };

    Box::new(get_marks)
}
/// Splits the grid into uniform-sized spacings (e.g. 100, 25, 1).
///
/// This function should return 3 positive step sizes, designating where the lines in the grid are drawn.
/// Lines are thicker for larger step sizes. Ordering of returned value is irrelevant.
///
/// Why only 3 step sizes? Three is the number of different line thicknesses that egui typically uses in the grid.
/// Ideally, those 3 are not hardcoded values, but depend on the visible range (accessible through `GridInput`).
Splits the grid into uniform-sized spacings .
This function should return 3 positive step sizes, designating where the lines in the grid are drawn.
Lines are thicker for larger step sizes. Ordering of returned value is irrelevant.


Splits the grid into uniform - sized spacings . This function should return 3 positive step sizes designating where the lines in the grid are drawn . Lines are thicker for larger step sizes . Ordering of returned value is irrelevant .
pub fn uniform_grid_spacer(spacer: impl Fn(GridInput) -> [f64; 3] + 'static) -> GridSpacer {
    let get_marks = move |input: GridInput| -> Vec<GridMark> {
        let bounds = input.bounds;
        let step_sizes = spacer(input);
        generate_marks(step_sizes, bounds)
    };
    Box::new(get_marks)
}
pub fn uniform_grid_spacer ( spacer : impl Fn ( GridInput ) -> [ f64 ; 3 ] + ' static ) -> GridSpacer { let get_marks = move | input : GridInput | -> Vec < GridMark > { let bounds = input . bounds ; let step_sizes = spacer ( input ) ; generate_marks ( step_sizes , bounds ) } ; Box :: new ( get_marks ) }
Splits the grid into uniform-sized spacings (e.g.
Splits the grid into uniform - sized spacings ( e . g .
spacer
impl Fn(GridInput) -> [f64; 3] + 'static
spacer
impl Fn(GridInput) -> [f64; 3] + 'static