src/SpatialHash.cs
/// <summary>Updates <paramref name="item"/>'s position in the tree. ONLY USE IF <paramref name="item"/> IS ALREADY IN THE TREE</summary>
/// <returns>True if <paramref name="item"/> was moved to a new bucket, false otherwise</returns>
Updates 's position in the tree. ONLY USE IF  IS ALREADY IN THE TREE
Updates ' s position in the tree . ONLY USE IF IS ALREADY IN THE TREE
public bool Update(T item) {
            Point bucket = Bucket(item),
                i = _item[item];
            if (bucket == i)
                return false;
            var t = _hash[i];
            if (t.Count <= 1) {
                t.Clear();
                Pool<HashSet<T>>.Free(t);
                _hash.Remove(i);
            } else
                t.Remove(item);
            Add(item, bucket);
            _item[item] = bucket;
            return true;
        }
public bool Update ( T item ) { Point bucket = Bucket ( item ) , i = _item [ item ] ; if ( bucket == i ) return false ; var t = _hash [ i ] ; if ( t . Count <= 1 ) { t . Clear ( ) ; Pool < HashSet < T > > . Free ( t ) ; _hash . Remove ( i ) ; } else t . Remove ( item ) ; Add ( item , bucket ) ; _item [ item ] = bucket ; return true ; }
Updates 's position in the tree.
Updates ' s position in the tree .
True if  was moved to a new bucket, false otherwise
True if was moved to a new bucket false otherwise
item
T