private XVector3 GetFurthestVertFrom(XVector3 o) { MaxHeap <XVector3> sorter = new MaxHeap <XVector3>((XVector3 a, XVector3 b) => { return((XVector3.Distance(o, a) <= XVector3.Distance(o, b)) ? -1 : 1); }); foreach (XVector3 vert in _verts) { sorter.Add(vert); } return(sorter.Remove()); }
public bool Add(T0 key, T1 value) { try { if (MemberCondition == null || MemberCondition(value)) { _Map.Add(key, value); _MaxSorter.Add(value); _MinSorter.Add(value); CollectionChanged?.Invoke(value); ItemAddition?.Invoke(value); return(true); } return(false); } catch { return(false); } }