public static double norm2(Point2D A,Point2D B){
  return (A.getX() - B.getX()) * (A.getX() - B.getX()) + (A.getY() - B.getY()) * (A.getY() - B.getY());
}

public static double norm2 ( Point2D A , Point2D B ) { return ( A . getX ( ) - B . getX ( ) ) * ( A . getX ( ) - B . getX ( ) ) + ( A . getY ( ) - B . getY ( ) ) * ( A . getY ( ) - B . getY ( ) ) ; }
computes the segment square length
