Function flat_tree::depth
[−]
[src]
pub fn depth(i: u64) -> u64
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);