bool FindCachedCorner(Site a, Site b, Site c, out double prev, out double next) { Corner corner=new Corner(a.Point,b.Point,c.Point); Tuple<double, double> prevNext; if (cornerTable.TryGetValue(corner, out prevNext)) { if (a.Point == corner.a) { prev = prevNext.Item1; next = prevNext.Item2; } else { prev = prevNext.Item2; next = prevNext.Item1; } foundCachedCorners++; return true; } prev = next = 0; return false; }
protected bool Equals(Corner other) { return b == other.b && ((a == other.a && c == other.c) || (a == other.c && c == other.a)); }