func BoxDist[N numeric, T any](targetMin, targetMax [2]N,
itemDist func(min, max [2]N, data T) N,
) (dist func(min, max [2]N, data T, item bool) N)
func Nearby(
dist func(min, max [2]N, data T, item bool) float64,
iter func(min, max [2]N, data T, dist float64) bool,
)
The return type of BoxDist is N, but Nearby requires a dist function that returns float64 regardless of N.
These types don't work together:
The return type of BoxDist is N, but Nearby requires a dist function that returns float64 regardless of N.