예제 #1
0
 public static int FindClosestStablePoint(int pos, IntPairCollection positions)
 {
     foreach (IntPair pair in positions)
     {
         if ((pos == pair.Key + 1) || (pos == pair.Key - 1))
         {
             return(pair.Key);
         }
     }
     return(pos);
 }
예제 #2
0
파일: UtilLib.cs 프로젝트: hsauro/auto-sbml
 public static int FindClosestStablePoint(int pos, IntPairCollection positions)
 {
     foreach (IntPair pair in positions)
     {
         if ((pos == pair.Key + 1) || (pos == pair.Key - 1)) return pair.Key;
     }
     return pos;
 }