Finding the vertices of a hypercube

Iterators.product returns multi-dimensional object. You can add vec to flatten it

julia> vec(collect(Iterators.product(zip(box.min_bounds, box.max_bounds)...)))
8-element Vector{Tuple{Float32, Float32, Float32}}:
 (1.0, 2.0, 3.0)
 (4.0, 2.0, 3.0)
 (1.0, 5.0, 3.0)
 (4.0, 5.0, 3.0)
 (1.0, 2.0, 6.0)
 (4.0, 2.0, 6.0)
 (1.0, 5.0, 6.0)
 (4.0, 5.0, 6.0)
4 Likes