src/Quadtree.cs
/// <summary>Removes the given item from the tree if it exists.</summary>
/// <returns>True if item was in the tree and was removed, otherwise false.</returns>
Removes the given item from the tree if it exists.
Removes the given item from the tree if it exists .
public bool Remove(T item) {
            if (!_item.TryGetValue(item, out var v))
                return false;
            v.Node.Remove(item);
            if (v.Node.Parent != null)
                _nodesToClean.Add(v.Node.Parent);
            QueueClean();
            _item.Remove(item);
            _safeItem.Remove(item);
            if (_item.Count == 0)
                _bounds = Rectangle.Empty;
            return true;
        }
public bool Remove ( T item ) { if ( ! _item . TryGetValue ( item , out var v ) ) return false ; v . Node . Remove ( item ) ; if ( v . Node . Parent != null ) _nodesToClean . Add ( v . Node . Parent ) ; QueueClean ( ) ; _item . Remove ( item ) ; _safeItem . Remove ( item ) ; if ( _item . Count == 0 ) _bounds = Rectangle . Empty ; return true ; }
Removes the given item from the tree if it exists.
Removes the given item from the tree if it exists .
True if item was in the tree and was removed, otherwise false.
True if item was in the tree and was removed otherwise false .
item
T