Function streemap::dice [−][src]
pub fn dice<N, T, S, R>(
rect: Rect<N>,
items: &mut [T],
f_item_size: S,
f_item_set_rect: R
) where
N: NumAssignOps + NumOps + PartialOrd + Zero + One + Copy + Sum,
S: Fn(&T) -> N,
R: FnMut(&mut T, Rect<N>),
Distribute items
inside rect
horizontally.
f_item_size
provide the size of an itemf_item_set_rect
receive the item distributed Rect. Called once for each item and in a stable order.
Complexity: O(2⨯items.len())