<?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: 2. Maths Pythagoras Theorem</title>
	<atom:link href="http://www.swiftless.com/tutorials/maths/pythagoras.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.swiftless.com/tutorials/maths/pythagoras.html</link>
	<description>Game Programming and Computer Graphics Tutorials</description>
	<lastBuildDate>Wed, 01 Feb 2012 09:19:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Swiftless</title>
		<link>http://www.swiftless.com/tutorials/maths/pythagoras.html/comment-page-1#comment-1069</link>
		<dc:creator>Swiftless</dc:creator>
		<pubDate>Mon, 06 Dec 2010 01:35:16 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=311#comment-1069</guid>
		<description>Hey Dan,

Then I would have to ask why are you using imaginary numbers as lengths?

Cheers,
Swiftless</description>
		<content:encoded><![CDATA[<p>Hey Dan,</p>
<p>Then I would have to ask why are you using imaginary numbers as lengths?</p>
<p>Cheers,<br />
Swiftless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.swiftless.com/tutorials/maths/pythagoras.html/comment-page-1#comment-1046</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 12 Nov 2010 18:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=311#comment-1046</guid>
		<description>What if A = 1 and B = i    ???</description>
		<content:encoded><![CDATA[<p>What if A = 1 and B = i    ???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Swiftless</title>
		<link>http://www.swiftless.com/tutorials/maths/pythagoras.html/comment-page-1#comment-388</link>
		<dc:creator>Swiftless</dc:creator>
		<pubDate>Sun, 11 Apr 2010 04:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=311#comment-388</guid>
		<description>Hi Flekken,

That is exactly true, A^2 + B^2 will only equal 0 if A and B is 0. 

While the formula you have given is the true formula for working out the distance between two points, look at what it is actually doing. I will look at 2D space:

Now if we have a collision when the result is 0, if we apply some basic maths to the distance formula, we can remove the sqrt:
0 = sqrt((x2-x1)^2 + (y2-y1)^2)
0^2 = sqrt((x2 - x1)^2 + (y2 - y1)^2)^2
0 = (x2 - x1)^2 + (y2 - y1)^2

And now look at what x2-x1 and y2-y1 do. They give us the length of the line segments A and B.

Therefore:
x2 - x1 = A and y2 - y1 = B
And then:
0 = (A)^2 + (B)^2
0 = A^2 + B^2

Therefore we have a collision. Both this shorthand version and the full version of the distance formula are the same thing.

Hope this helps clarify :)
Swiftless</description>
		<content:encoded><![CDATA[<p>Hi Flekken,</p>
<p>That is exactly true, A^2 + B^2 will only equal 0 if A and B is 0. </p>
<p>While the formula you have given is the true formula for working out the distance between two points, look at what it is actually doing. I will look at 2D space:</p>
<p>Now if we have a collision when the result is 0, if we apply some basic maths to the distance formula, we can remove the sqrt:<br />
0 = sqrt((x2-x1)^2 + (y2-y1)^2)<br />
0^2 = sqrt((x2 &#8211; x1)^2 + (y2 &#8211; y1)^2)^2<br />
0 = (x2 &#8211; x1)^2 + (y2 &#8211; y1)^2</p>
<p>And now look at what x2-x1 and y2-y1 do. They give us the length of the line segments A and B.</p>
<p>Therefore:<br />
x2 &#8211; x1 = A and y2 &#8211; y1 = B<br />
And then:<br />
0 = (A)^2 + (B)^2<br />
0 = A^2 + B^2</p>
<p>Therefore we have a collision. Both this shorthand version and the full version of the distance formula are the same thing.</p>
<p>Hope this helps clarify <img src='http://www.swiftless.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Swiftless</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flekken</title>
		<link>http://www.swiftless.com/tutorials/maths/pythagoras.html/comment-page-1#comment-380</link>
		<dc:creator>flekken</dc:creator>
		<pubDate>Sat, 10 Apr 2010 18:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://swiftless.com/wordpress/?p=311#comment-380</guid>
		<description>I don&#039;t understand how can you use this for calculating distance. The only time A^2 + B^2 would be 0 is when A and B is 0. The proper formula for calculating distance between 2 point is: 
sqrt( (x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 )</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand how can you use this for calculating distance. The only time A^2 + B^2 would be 0 is when A and B is 0. The proper formula for calculating distance between 2 point is:<br />
sqrt( (x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2 )</p>
]]></content:encoded>
	</item>
</channel>
</rss>

