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 SecureSortedSet() { _Map = new Map <T0, T1>(); _MaxSorter = new MaxHeap <T1>(null); _MinSorter = new MinHeap <T1>(null); }
public SecureSortedSet(Comparison <T1> comparer) { _Map = new Map <T0, T1>(); _MaxSorter = new MaxHeap <T1>(comparer); _MinSorter = new MinHeap <T1>(comparer); }