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

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

Examples

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