Exemple #1
0
 /// <summary>
 /// Get the perimeter of the polygon.
 /// May be oprimized for PolyAdv
 /// </summary>
 /// <param name="poly"></param>
 /// <returns></returns>
 public static float GetPerimeter(this IPoly poly)
 {
     if (poly is IPolyExtensionPerimeter)
     {
         return(((IPolyExtensionPerimeter)poly).AdvGetPerimeter());
     }
     else if (poly is IPolyForwarder)
     {
         return(((IPolyForwarder)poly).GetPoly().GetPerimeter());
     }
     else
     {
         return(poly.CalcPerimeter());
     }
 }