Пример #1
0
 private double Strength(int i)
 {
     if (strengthCall == null)
     {
         return(DEFAULT_STRENGTH);
     }
     return(strengthCall.Invoke(nodes[i]));
 }
Пример #2
0
 private double SetX(int i)
 {
     if (xCallback == null)
     {
         return(0);
     }
     return(xCallback.Invoke(nodes[i]));
 }
Пример #3
0
 private double Y(int i)
 {
     if (yCall == null)
     {
         return(0);
     }
     return(yCall.Invoke(nodes[i]));
 }
Пример #4
0
        private double Radius(NodeInfo node)
        {
            if (radius == null)
            {
                return DEFAULT_RADIUS;
            }

            double r = radius.Invoke(node);
            if (r < 0)
            {
                return -r;
            }
            if (r == 0)
            {
                return DEFAULT_RADIUS;
            }
            return r;
        }
Пример #5
0
        private double Radius(NodeInfo node)
        {
            if (radiusCall == null)
            {
                return(DEFAULT_RADIUS);
            }

            double r = radiusCall.Invoke(node);

            if (r < 0)
            {
                return(-r);
            }
            if (r == 0)
            {
                return(DEFAULT_RADIUS);
            }
            return(r);
        }