public final Sector union(Sector that){
  if (that == null)   return this;
  Angle minLat=this.minLatitude;
  Angle maxLat=this.maxLatitude;
  Angle minLon=this.minLongitude;
  Angle maxLon=this.maxLongitude;
  if (that.minLatitude.degrees < this.minLatitude.degrees)   minLat=that.minLatitude;
  if (that.maxLatitude.degrees > this.maxLatitude.degrees)   maxLat=that.maxLatitude;
  if (that.minLongitude.degrees < this.minLongitude.degrees)   minLon=that.minLongitude;
  if (that.maxLongitude.degrees > this.maxLongitude.degrees)   maxLon=that.maxLongitude;
  return new Sector(minLat,maxLat,minLon,maxLon);
}

public final Sector union ( Sector that ) { if ( that == null ) return this ; Angle minLat = this . minLatitude ; Angle maxLat = this . maxLatitude ; Angle minLon = this . minLongitude ; Angle maxLon = this . maxLongitude ; if ( that . minLatitude . degrees < this . minLatitude . degrees ) minLat = that . minLatitude ; if ( that . maxLatitude . degrees > this . maxLatitude . degrees ) maxLat = that . maxLatitude ; if ( that . minLongitude . degrees < this . minLongitude . degrees ) minLon = that . minLongitude ; if ( that . maxLongitude . degrees > this . maxLongitude . degrees ) maxLon = that . maxLongitude ; return new Sector ( minLat , maxLat , minLon , maxLon ) ; }
returns a new sector whose angles are the extremes of the this sector and another . the new sector ' s minimum latitude and longitude will be the minimum of the two sectors . the new sector ' s maximum latitude and longitude will be the maximum of the two sectors . the sectors are assumed to be normalized to + / - 90 degrees latitude and + / - 180 degrees longitude . the result of the operation is undefined if they are not .
