@ Pure public double distance ( BusItineraryHalt halt ) { assert halt != null ; final GeoLocationPoint p = getGeoPosition ( ) ; final GeoLocationPoint p2 = halt . getGeoPosition ( ) ; if ( p != null && p2 != null ) { return Point2D . getDistancePointPoint ( p . getX ( ) , p . getY ( ) , p2 . getX ( ) , p2 . getY ( ) ) ; } return Double . NaN ; }
Replies the distance between the given bus halt and this bus halt .