public float distanceToCenter(float x,float y){
  MPPointF c=getCenterOffsets();
  float dist=0f;
  float xDist=0f;
  float yDist=0f;
  if (x > c.x) {
    xDist=x - c.x;
  }
 else {
    xDist=c.x - x;
  }
  if (y > c.y) {
    yDist=y - c.y;
  }
 else {
    yDist=c.y - y;
  }
  dist=(float)Math.sqrt(Math.pow(xDist,2.0) + Math.pow(yDist,2.0));
  MPPointF.recycleInstance(c);
  return dist;
}

public float distanceToCenter ( float x , float y ) { MPPointF c = getCenterOffsets ( ) ; float dist = 0f ; float xDist = 0f ; float yDist = 0f ; if ( x > c . x ) { xDist = x - c . x ; } else { xDist = c . x - x ; } if ( y > c . y ) { yDist = y - c . y ; } else { yDist = c . y - y ; } dist = ( float ) Math . sqrt ( Math . pow ( xDist , 2.0 ) + Math . pow ( yDist , 2.0 ) ) ; MPPointF . recycleInstance ( c ) ; return dist ; }
returns the distance of a certain point on the chart to the center of the chart .
