A line segment can be defined by a pair of points. There are well-known algorithms for finding whether two line segments in 2D space intersect. But what if we make it a bit trickier by adding a width to the line?

Imagine you have a line segment defined by a pair of points *and* a width. What you end up with is a rectangle whose sides *are not necessarily aligned with the coordinate axes.* (So you can't use the standard "rectangle overlap" functions.) What would be the best way to determine if two such line segments overlap?