question: public double distance ( IMultiPoint imp ) { if ( imp . dimensionality ( ) != 2 ) { throw new IllegalArgumentException ( "distance computation can only be performed between two-dimensional points" ) ; } double ox = imp . getCoordinate ( 1 ) ; double oy = imp . getCoordinate ( 2 ) ; return Math . sqrt ( ( ox - x ) * ( ox - x ) + ( oy - y ) * ( oy - y ) ) ; }
target:  Return the Euclidean distance between the given multipoint. Ensures that only valid for two-dimensional comparison.