<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Collision Detection</title>
	<atom:link href="http://tynerblain.com/blog/2005/11/24/collision-detection/feed/" rel="self" type="application/rss+xml" />
	<link>http://tynerblain.com/blog/2005/11/24/collision-detection/</link>
	<description>Software product success.</description>
	<lastBuildDate>Thu, 18 Mar 2010 20:39:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott Sehlhorst</title>
		<link>http://tynerblain.com/blog/2005/11/24/collision-detection/comment-page-1/#comment-4</link>
		<dc:creator>Scott Sehlhorst</dc:creator>
		<pubDate>Wed, 04 Jan 2006 06:46:54 +0000</pubDate>
		<guid isPermaLink="false">http://tynerblain.com/blog/2005/11/24/collision-detection/#comment-4</guid>
		<description>Richard Krog said,

December 5, 2005 at 10:45 am · Edit

I came across a problem just like the overlapping rectangles, but with only one dimention — time. “Do date ranges overlap?” We came up with:

Overlap = A.start before B.end &amp;&amp; B.start before A.end

Likewise, you can remove the negative logic with the following:

1. the right edge of A is to the *RIGHT* of the left edge of B
2. the left edge of A is to the *LEFT* of the right edge of B
3. the bottom of A is *BELOW* the top of B
4. the top of A is *ABOVE* the bottom of B

IF (1 &amp;&amp; 2 &amp;&amp; 3 &amp;&amp; 4) THEN collision == TRUE;

Both solutions are fail-fast, so the change is mostly semantic.</description>
		<content:encoded><![CDATA[<p>Richard Krog said,</p>
<p>December 5, 2005 at 10:45 am · Edit</p>
<p>I came across a problem just like the overlapping rectangles, but with only one dimention — time. “Do date ranges overlap?” We came up with:</p>
<p>Overlap = A.start before B.end &#038;&#038; B.start before A.end</p>
<p>Likewise, you can remove the negative logic with the following:</p>
<p>1. the right edge of A is to the *RIGHT* of the left edge of B<br />
2. the left edge of A is to the *LEFT* of the right edge of B<br />
3. the bottom of A is *BELOW* the top of B<br />
4. the top of A is *ABOVE* the bottom of B</p>
<p>IF (1 &#038;&#038; 2 &#038;&#038; 3 &#038;&#038; 4) THEN collision == TRUE;</p>
<p>Both solutions are fail-fast, so the change is mostly semantic.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
