<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixdocs.com/skins/common/feed.css?63"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Get dist - Revision history</title>
		<link>http://fenixdocs.com/index.php?title=Get_dist&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.10.1</generator>
		<lastBuildDate>Fri, 01 May 2026 08:47:33 GMT</lastBuildDate>
		<item>
			<title>Sandman at 11:40, 25 December 2007</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=3981&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 11:40, 25 December 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 107:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 107:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;| [[get_angle]]() and [[get_dist]]() with a [[process]] || || [[fget_angle]]() and [[fget_dist]]()&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;| [[get_angle]]() and [[get_dist]]() with a [[process]] || || [[fget_angle]]() and [[fget_dist]]()&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;|}&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;|}&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;{{Funcbox&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;  | category = Processinteraction&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;}}&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 25 Dec 2007 11:40:45 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman: /* Example */</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2626&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 12:07, 11 July 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[get_dist]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[get_dist]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;This example could also be done with [[fget_dist]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;This example could also be done with [[fget_dist]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the [[&lt;/ins&gt;resolution&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;is &amp;gt;1.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Resolution is 100:&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Resolution is 100:&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 11 Jul 2007 12:07:02 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman: /* Example */</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2622&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 11:54, 11 July 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 41:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    resolution = 100;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    resolution = 100;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;    // Create mouse graph and start &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;moisepointer&lt;/del&gt;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    // Create mouse graph and start &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;mousepointer&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    x = new_map(20,20,screen_depth);&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    x = new_map(20,20,screen_depth);&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    map_clear(0,x,rgb(255,0,0));&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    map_clear(0,x,rgb(255,0,0));&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[get_dist]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[get_dist]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;This example could also be done with [[&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fget_disy&lt;/del&gt;]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;This example could also be done with [[&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fget_dist&lt;/ins&gt;]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Resolution is 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;{|&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;{|&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;| http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/get_angle.PNG || VS || http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/fget_angle.PNG&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;| http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/get_angle.PNG || VS || http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/fget_angle.PNG&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 11 Jul 2007 11:54:47 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman: /* Example */</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2621&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 11:53, 11 July 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 97:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 97:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;End&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;End&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]](), [[get_dist&lt;/ins&gt;]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;This example could also be done with [[fget_disy]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;This example could also be done with [[fget_disy]](), which is easier and doesn't require an extra [[process]]. It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 11 Jul 2007 11:53:52 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman: /* Definition */</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2620&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Definition&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 11:53, 11 July 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 5:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 5:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;'''INT''' get_dist ( &amp;lt;'''INT''' processID&amp;gt; )&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;'''INT''' get_dist ( &amp;lt;'''INT''' processID&amp;gt; )&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;Returns the distance between the coordinates of a certain [[process]] and the process calling get_dist(). The distance returned is converted to the [[resolution]] of the process calling get_dist().&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Returns the distance between the coordinates of a certain [[process]] and the process calling &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;get_dist&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;(). The distance returned is converted to the [[resolution]] of the process calling &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;get_dist&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;().&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Parameters ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Parameters ==&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 11 Jul 2007 11:53:16 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman: /* Example */</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2619&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 11:52, 11 July 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 99:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;This example could also be done with [[&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fget_angle&lt;/del&gt;]](), which is easier and doesn't require an extra [[process]].&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;This example could also be done with [[&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;fget_disy&lt;/ins&gt;]](), which is easier and doesn't require an extra [[process]]. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;It also give a much more accurate distance when resolution is &amp;gt;1.&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{|&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;| http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/get_angle.PNG || VS || http://wwwhome.cs.utwente.nl/~bergfi/fenix/wiki/fget_angle.PNG&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;| [[get_angle]]() and [[get_dist]]() with a [[process]] || || [[fget_angle]]() and [[fget_dist]]()&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|}&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 11 Jul 2007 11:52:38 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
		<item>
			<title>Sandman at 11:47, 11 July 2007</title>
			<link>http://fenixdocs.com/index.php?title=Get_dist&amp;diff=2618&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:functions]]&lt;br /&gt;
[[Category:processinteraction]]&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
'''INT''' get_dist ( &amp;lt;'''INT''' processID&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Returns the distance between the coordinates of a certain [[process]] and the process calling get_dist(). The distance returned is converted to the [[resolution]] of the process calling get_dist().&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{|&lt;br /&gt;
| '''INT''' processID || - The other [[process]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
'''INT''' : The wanted distance.&lt;br /&gt;
{|&lt;br /&gt;
| -1 || - An error occurred: invalid [[process]].&lt;br /&gt;
|-&lt;br /&gt;
| !-1 || - The wanted distance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program angling;&lt;br /&gt;
Const&lt;br /&gt;
    screen_width     = 320;&lt;br /&gt;
    screen_height    = 200;&lt;br /&gt;
    screen_depth     = 8;&lt;br /&gt;
    screen_fps       = 60;&lt;br /&gt;
    screen_frameskip = 0;&lt;br /&gt;
Global&lt;br /&gt;
    int distance;&lt;br /&gt;
    int tempID;&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    // Set the screen mode&lt;br /&gt;
    set_mode(screen_width,screen_height,screen_depth);&lt;br /&gt;
    set_fps(screen_fps,screen_frameskip);&lt;br /&gt;
&lt;br /&gt;
    // Change this to see what happens&lt;br /&gt;
    resolution = 100;&lt;br /&gt;
&lt;br /&gt;
    // Create mouse graph and start moisepointer&lt;br /&gt;
    x = new_map(20,20,screen_depth);&lt;br /&gt;
    map_clear(0,x,rgb(255,0,0));&lt;br /&gt;
    mousepointer(0,x);&lt;br /&gt;
&lt;br /&gt;
    // Create arrow, assign to graph&lt;br /&gt;
    graph = new_map(30,30,screen_depth);&lt;br /&gt;
    drawing_map(0,graph);&lt;br /&gt;
    drawing_color(rgb(0,255,0));&lt;br /&gt;
    draw_line( 0,29,29,30/2);&lt;br /&gt;
    draw_line( 0, 0,30,30/2);&lt;br /&gt;
&lt;br /&gt;
    // Set position&lt;br /&gt;
    x = screen_width /2 * resolution;&lt;br /&gt;
    y = screen_height/2 * resolution;&lt;br /&gt;
&lt;br /&gt;
    // Display distance&lt;br /&gt;
    write(0,0,0,0,&amp;quot;Distance:&amp;quot;);&lt;br /&gt;
    write_int(0,60,0,0,&amp;amp;distance);&lt;br /&gt;
&lt;br /&gt;
    // Always point to the mouse&lt;br /&gt;
    Repeat&lt;br /&gt;
        // Get the angle and distance between this process' coordinates and those of mousegraph.&lt;br /&gt;
        // We can use TYPE and get_id() here, because usually there would only be one&lt;br /&gt;
        // mousepointer and one always.&lt;br /&gt;
        tempID = get_id(type mousepointer);&lt;br /&gt;
        angle = get_angle(tempID);&lt;br /&gt;
        distance = get_dist(tempID);&lt;br /&gt;
        frame;&lt;br /&gt;
    Until(key(_esc))&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Follows the mouse coordinates. x is always mouse.x and y is always mouse.y&lt;br /&gt;
 * for processes with priority &amp;lt;1. The graphic of this process will be a certain graphic.&lt;br /&gt;
 * int file     - The fileID of the file where the graphic is located&lt;br /&gt;
 * int graph    - The graphID of the graphic to be used for this process&lt;br /&gt;
 */&lt;br /&gt;
Process mousepointer(int file,int graph)&lt;br /&gt;
Begin&lt;br /&gt;
    // Set the priority to 1, because we first want to have the correct coordinates of&lt;br /&gt;
    // the mouse set in this process. Then after that other process can use those coordinates.&lt;br /&gt;
    priority = 1;&lt;br /&gt;
    // Obtain father's resolution&lt;br /&gt;
    resolution = father.resolution;&lt;br /&gt;
    // Loop&lt;br /&gt;
    Loop&lt;br /&gt;
    	// Obtain X and Y coordinates of the mouse and adjust for resolution&lt;br /&gt;
        // (mouse.y and mouse.y have an unchangeable resolution of 1)&lt;br /&gt;
        x = mouse.x * resolution;&lt;br /&gt;
        y = mouse.y * resolution;&lt;br /&gt;
        frame;&lt;br /&gt;
    End&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Used in example: [[set_mode]](), [[new_map]](), [[map_clear]](), [[drawing_map]](), [[drawing_color]](), [[draw_line]](), [[write]](), [[write_int]](), [[get_id]](), [[get_angle]](), [[resolution]], [[mouse]], [[graph]], [[x]], [[y]], [[angle]], [[priority]]&lt;br /&gt;
&lt;br /&gt;
This example could also be done with [[fget_angle]](), which is easier and doesn't require an extra [[process]].&lt;/div&gt;</description>
			<pubDate>Wed, 11 Jul 2007 11:47:49 GMT</pubDate>			<dc:creator>Sandman</dc:creator>			<comments>http://fenixdocs.com/index.php/Talk:Get_dist</comments>		</item>
	</channel>
</rss>