anchor.diff:  %% @private
   %% --------------------------------------------------------------------
   -spec to_node_id(PosList :: [ot_child_code()],
  -                 #ot_node_id{}, 
  +                 #ot_node_id{},
                    MaxDepth :: non_neg_integer()) -> #ot_node_id{}.
   %% --------------------------------------------------------------------
   to_node_id([], NodeId, _MaxDepth) -> NodeId;
  
positive.code: -spec is_all_ones(Point :: #ot_node_id{}) -> boolean().
  %% --------------------------------------------------------------------
  is_all_ones(#ot_node_id{depth=D, x=X, y=Y, z=Z}) ->
      Sum = bit_count(X) + bit_count(Y) + bit_count(Z),    
      (Sum == D*3).
  
  %% common_prefix/2
  %% --------------------------------------------------------------------
  %% @doc seperate two node specs into a common prefix and subtrees of the rest.
  %% @end
  -spec common_prefix(#ot_node_id{}, #ot_node_id{}) -> 
            {Prefix :: #ot_node_id{}, Rest1 :: #ot_node_id{}, Rest2 :: #ot_node_id{}}.
  %% --------------------------------------------------------------------
  common_prefix(P1,P2) -> common_prefix(#ot_node_id{depth=0,x=0,y=0,z=0}, P1, P2).
  
negative.code: %% @doc normalize two points so that point 1 will hold the lesser, point 2
  %%      the greater value in all dimensions.
  %% @end
  -spec normalize(P1 :: PointType, P2 :: PointType) ->
             {P1new :: PointType,  P2new :: PointType} when
      PointType :: #ot_node_id{} | vec_3d().
  %% --------------------------------------------------------------------
  