Keep the hexagons placed within hexagon grid when setting spacing. Previous version placed them in rectangular grid.
Note that it does change the argument type for spacing function arguments from [f64; 2] to f64 it is still possible to set separate spacing for vertical and horizontal spacing using horizontal_spacing and vertical_spacing functions.
If you want to maintain old function signature I don't mind changing using different approach.
introduce spacing_uniform method with single argument -> not sure if that's worth it considering that most of the time people will want the uniform spacing
keep the [f64; 2] argument, but multiply one of them by cos(30) -> it may be slightly confusing actual vertical/horizontal spacing differs from argument by than nontrivial multiplier, also having grid.vertical_spacing(x).horizontal_spacing(y) different behavior than grid.spacing([x, y]) can be unexpected
move the cos(30) multiplication next to the rest of grid calculation, the problem of actual spacing differing from numbers set is still there, but at least separate methods behave same as array version
Keep the hexagons placed within hexagon grid when setting spacing. Previous version placed them in rectangular grid.
Note that it does change the argument type for spacing function arguments from
[f64; 2]
tof64
it is still possible to set separate spacing for vertical and horizontal spacing usinghorizontal_spacing
andvertical_spacing
functions.If you want to maintain old function signature I don't mind changing using different approach.
[f64; 2]
argument, but multiply one of them by cos(30) -> it may be slightly confusing actual vertical/horizontal spacing differs from argument by than nontrivial multiplier, also havinggrid.vertical_spacing(x).horizontal_spacing(y)
different behavior thangrid.spacing([x, y])
can be unexpected