boundingbox.cc
// Checks the given point to determine if it is beyond the current extrema.
// The values of ra_min_, ra_max_, dec_min_, and dec_max_ are updated if
// needed.
Checks the given point to determine if it is beyond the current extrema.
Checks the given point to determine if it is beyond the current extrema .
void BoundingBox::UpdateExtrema(const WcsProjection &wcs, double x, double y) {
  double ra;
  double dec;
  wcs.ToRaDec(x, y, &ra, &dec);
  if (is_wrapped_) {
    WrapAround::MakeRaMonotonic(&ra);
  }
  if (ra > ra_max_.ra) {
    ra_max_.SetValues(ra, dec, x, y);
  } else if (ra < ra_min_.ra) {
    ra_min_.SetValues(ra, dec, x, y);
  }
  if (dec > dec_max_.dec) {
    dec_max_.SetValues(ra, dec, x, y);
  } else if (dec < dec_min_.dec) {
    dec_min_.SetValues(ra, dec, x, y);
  }
}
void BoundingBox :: UpdateExtrema ( const WcsProjection & wcs , double x , double y ) { double ra ; double dec ; wcs . ToRaDec ( x , y , & ra , & dec ) ; if ( is_wrapped_ ) { WrapAround :: MakeRaMonotonic ( & ra ) ; } if ( ra > ra_max_ . ra ) { ra_max_ . SetValues ( ra , dec , x , y ) ; } else if ( ra < ra_min_ . ra ) { ra_min_ . SetValues ( ra , dec , x , y ) ; } if ( dec > dec_max_ . dec ) { dec_max_ . SetValues ( ra , dec , x , y ) ; } else if ( dec < dec_min_ . dec ) { dec_min_ . SetValues ( ra , dec , x , y ) ; } }
Checks the given point to determine if it is beyond the current extrema.
Checks the given point to determine if it is beyond the current extrema .
// Update ra to be monotonic across the image if the image wraps around // the 0-360 discontinuity. // Check dec separately because the min or max ra, dec could occur at // the same point.