src/slice.cpp
/**
 *	Checks if two slices overlap.
 */
Checks if two slices overlap.
Checks if two slices overlap .
bool Slice::overlap(const Slice& rhs) const {
	return 	x_ 			< rhs.x_ + rhs.w_ 	&&
			y_ 			< rhs.y_ + rhs.h_ 	&&
			x_ + w_ 	> rhs.x_ 			&&
			y_ + h_ 	> rhs.y_;
}
bool Slice :: overlap ( const Slice & rhs ) const { return x_ < rhs . x_ + rhs . w_ && y_ < rhs . y_ + rhs . h_ && x_ + w_ > rhs . x_ && y_ + h_ > rhs . y_ ; }
Checks if two slices overlap.
Checks if two slices overlap .