internal static void Snap(SnapEdge edge, List <SnapEdge> otherEdges, ref float maxDist, ref float snapVal, List <KeyValuePair <SnapEdge, SnapEdge> > activeEdges)
{
using (List <SnapEdge> .Enumerator enumerator = otherEdges.GetEnumerator())
{
while (enumerator.MoveNext())
{
SnapEdge current = enumerator.Current;
if (SnapEdge.ShouldEdgesSnap(edge, current))
{
float num = Mathf.Abs(current.pos - edge.pos);
if ((double)num < (double)maxDist)
{
maxDist = num;
snapVal = current.pos - edge.pos;
activeEdges.Clear();
activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
}
else if ((double)num == (double)maxDist)
{
activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
}
}
}
}
}