pub fn spans_with_depth(i: usize, depth: usize) -> (usize, usize)
Expand description

Returns the left and right most nodes in the tree that the node spans, with a depth.

Examples

assert_eq!(flat_tree::spans_with_depth(0, 0), (0, 0));
assert_eq!(flat_tree::spans_with_depth(1, 1), (0, 2));
assert_eq!(flat_tree::spans_with_depth(3, 2), (0, 6));
assert_eq!(flat_tree::spans_with_depth(23, 3), (16, 30));
assert_eq!(flat_tree::spans_with_depth(27, 2), (24, 30));