Function flat_tree::depth

source ·
pub const fn depth(i: u64) -> u64
Expand description

Returns the depth of a node.

Examples

assert_eq!(flat_tree::depth(0), 0);
assert_eq!(flat_tree::depth(1), 1);
assert_eq!(flat_tree::depth(2), 0);
assert_eq!(flat_tree::depth(3), 2);
assert_eq!(flat_tree::depth(4), 0);