src/main/java/com/mxgraph/util/mxLine.java
public double ptSegDistSq(mxPoint pt)
	{
		return new Line2D.Double(getX(), getY(), endPoint.getX(), endPoint
				.getY()).ptSegDistSq(pt.getX(), pt.getY());
	}
/**
	 * Returns the square of the shortest distance from a point to this 
	 * line segment.
	 *
	 * @param pt the point whose distance is being measured
	 * @return the square of the distance from the specified point to this segment.
	 */
Returns the square of the shortest distance from a point to this
line segment.

@param pt the point whose distance is being measured
@return the square of the distance from the specified point to this segment.
Returns the square of the shortest distance from a point to this line segment . @param pt the point whose distance is being measured @return the square of the distance from the specified point to this segment .
public double ptSegDistSq(mxPoint pt)
	{
		return new Line2D.Double(getX(), getY(), endPoint.getX(), endPoint
				.getY()).ptSegDistSq(pt.getX(), pt.getY());
	}
public double ptSegDistSq ( mxPoint pt ) { return new Line2D . Double ( getX ( ) , getY ( ) , endPoint . getX ( ) , endPoint . getY ( ) ) . ptSegDistSq ( pt . getX ( ) , pt . getY ( ) ) ; }
Returns the square of the shortest distance from a point to this
 line segment.
Returns the square of the shortest distance from a point to this line segment .