src/Geometry/Box1dInline.hh
//------------------------------------------------------------------------------
// Test if we intersect a line segment (interior counts as intersection).
//------------------------------------------------------------------------------
Test if we intersect a line segment (interior counts as intersection).
Test if we intersect a line segment ( interior counts as intersection ) .
inline
bool
Box1d::
intersect(const Vector& s0, const Vector& s1) const {
  const auto smin = std::min(s0.x(), s1.x());
  const auto smax = std::max(s0.x(), s1.x());
  if ((smin > mCenter.x() + mExtent) or
      (smax < mCenter.x() - mExtent)) return false;
  return true;
}
inline bool Box1d :: intersect ( const Vector & s0 , const Vector & s1 ) const { const auto smin = std :: min ( s0 . x ( ) , s1 . x ( ) ) ; const auto smax = std :: max ( s0 . x ( ) , s1 . x ( ) ) ; if ( ( smin > mCenter . x ( ) + mExtent ) or ( smax < mCenter . x ( ) - mExtent ) ) return false ; return true ; }
Test if we intersect a line segment (interior counts as intersection).
Test if we intersect a line segment ( interior counts as intersection ) .