Esempio n. 1
0
 private void EnsurePointPairListLength(PointPairList ppl, int length)
 {
     int delta = length-ppl.Count;
     
     if(delta > 0)
     {   // Add additional points.
         for(int i=0; i<delta; i++) {
             ppl.Add(0.0, 0.0);
         }
     }
     else if(delta < 0)
     {   // Remove excess points.
         ppl.RemoveRange(length, -delta);
     }
 }