00001 #ifndef Impala_Core_Geometry_OverlapsAnywhere1d_h
00002 #define Impala_Core_Geometry_OverlapsAnywhere1d_h
00003
00004 namespace Impala
00005 {
00006 namespace Core
00007 {
00008 namespace Geometry
00009 {
00010
00011
00015 template <class T>
00016 inline bool
00017 OverlapsAnywhere1d(T start1, T end1, T start2, T end2)
00018 {
00019 if ((start1 >= start2) && (start1 <= end2))
00020 return true;
00021 if ((end1 >= start2) && (end1 <= end2))
00022 return true;
00023 if ((start2 >= start1) && (start2 <= end1))
00024 return true;
00025 return false;
00026 }
00027
00028 }
00029 }
00030 }
00031
00032 #endif