/// <summary> /// Calculates the distance between the two given points. /// </summary> protected virtual float GetDistance(float x1, float y1, float x2, float y2) { //return Math.abs(y1 - y2); //return Math.abs(x1 - x2); return(ChartUtil.Hypot(x1 - x2, y1 - y2)); }