code: function(px) {
          return Math.sqrt(
              Math.pow(this.x - px.x, 2) +
              Math.pow(this.y - px.y, 2)
          );
      }
docs: APIMethod: distanceTo
  Returns the distance to the pixel point passed in as a parameter.
  
  Parameters:
  px - {<OpenLayers.Pixel>}
  
  Returns:
  {Float} The pixel point passed in as parameter to calculate the
  distance to.