<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fingswotidun.com/code/index.php?action=history&amp;feed=atom&amp;title=Collision_Detection</id>
		<title>Collision Detection - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://fingswotidun.com/code/index.php?action=history&amp;feed=atom&amp;title=Collision_Detection"/>
		<link rel="alternate" type="text/html" href="https://fingswotidun.com/code/index.php?title=Collision_Detection&amp;action=history"/>
		<updated>2026-09-29T04:25:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://fingswotidun.com/code/index.php?title=Collision_Detection&amp;diff=1300&amp;oldid=prev</id>
		<title>Lerc at 19:32, 11 June 2015</title>
		<link rel="alternate" type="text/html" href="https://fingswotidun.com/code/index.php?title=Collision_Detection&amp;diff=1300&amp;oldid=prev"/>
				<updated>2015-06-11T19:32:45Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:32, 11 June 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	setRgb(0,0,128);&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	setRgb(0,0,128);&amp;#160; &amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; drawLine(bullet.x,bullet.y,thing.x,thing.y);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; drawLine(bullet.x,bullet.y,thing.x,thing.y);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; var &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;d &lt;/del&gt;= &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Math.round(&lt;/del&gt;distance(bullet,thing&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/del&gt;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; var &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;distanceToBullet &lt;/ins&gt;= distance(bullet,thing);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;var d = Math.round(distanceToBullet);&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; print(d,thing.x,thing.y-10);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; print(d,thing.x,thing.y-10);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lerc</name></author>	</entry>

	<entry>
		<id>https://fingswotidun.com/code/index.php?title=Collision_Detection&amp;diff=1299&amp;oldid=prev</id>
		<title>Lerc: Created page with &quot;&lt;edcode&gt;  var things = [];  var bullets = [];  things.push(makeThing(100,100)); things.push(makeThing(200,100)); things.push(makeThing(300,100)); things.push(makeThing(400,100...&quot;</title>
		<link rel="alternate" type="text/html" href="https://fingswotidun.com/code/index.php?title=Collision_Detection&amp;diff=1299&amp;oldid=prev"/>
				<updated>2015-06-11T19:18:13Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;edcode&amp;gt;  var things = [];  var bullets = [];  things.push(makeThing(100,100)); things.push(makeThing(200,100)); things.push(makeThing(300,100)); things.push(makeThing(400,100...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;edcode&amp;gt;&lt;br /&gt;
&lt;br /&gt;
var things = [];&lt;br /&gt;
&lt;br /&gt;
var bullets = [];&lt;br /&gt;
&lt;br /&gt;
things.push(makeThing(100,100));&lt;br /&gt;
things.push(makeThing(200,100));&lt;br /&gt;
things.push(makeThing(300,100));&lt;br /&gt;
things.push(makeThing(400,100));&lt;br /&gt;
things.push(makeThing(500,100));&lt;br /&gt;
&lt;br /&gt;
bullets.push(makeThing(250,300));&lt;br /&gt;
&lt;br /&gt;
function makeThing (x,y) {&lt;br /&gt;
  var result={};&lt;br /&gt;
  result.x=x;&lt;br /&gt;
  result.y=y;&lt;br /&gt;
  return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function drawThing(thing) { &lt;br /&gt;
  setRgb(255,128,0); &lt;br /&gt;
  fillCircle(thing.x,thing.y,10);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function drawBullet(bullet) {&lt;br /&gt;
  function drawLineToThing(thing) {&lt;br /&gt;
	setRgb(0,0,128);     &lt;br /&gt;
    drawLine(bullet.x,bullet.y,thing.x,thing.y);&lt;br /&gt;
    var d = Math.round(distance(bullet,thing));&lt;br /&gt;
    &lt;br /&gt;
    print(d,thing.x,thing.y-10);&lt;br /&gt;
  }&lt;br /&gt;
  setRgb(255,0,128); &lt;br /&gt;
  fillCircle(bullet.x,bullet.y,10);&lt;br /&gt;
  things.forEach(drawLineToThing);&lt;br /&gt;
    &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function move() {&lt;br /&gt;
  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function draw() {&lt;br /&gt;
  things.forEach(drawThing);&lt;br /&gt;
  bullets.forEach(drawBullet);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
run(move,draw);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/edcode&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lerc</name></author>	</entry>

	</feed>