<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_getDir</id>
		<title>MIST getDir - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=MIST_getDir"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_getDir&amp;action=history"/>
		<updated>2026-04-30T00:41:24Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=MIST_getDir&amp;diff=1002&amp;oldid=prev</id>
		<title>Grimes at 22:56, 13 April 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=MIST_getDir&amp;diff=1002&amp;oldid=prev"/>
				<updated>2018-04-13T22:56:22Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Mission Scripting&lt;br /&gt;
&lt;br /&gt;
|fName= mist.utils.getDir|&lt;br /&gt;
&lt;br /&gt;
|vNum = Mist 2.0&lt;br /&gt;
&lt;br /&gt;
|desc= gets heading-error corrected direction from point along line vector vec in radians. Value will always be between 0 and 2Pi (360 degrees)|&lt;br /&gt;
&lt;br /&gt;
|rtnType= number&lt;br /&gt;
&lt;br /&gt;
|reqType1= vec3&lt;br /&gt;
&lt;br /&gt;
|reqName1= vec&lt;br /&gt;
&lt;br /&gt;
|reqType2= &lt;br /&gt;
&lt;br /&gt;
|reqName2= &lt;br /&gt;
&lt;br /&gt;
|reqType3=&lt;br /&gt;
&lt;br /&gt;
|optType1= vec3&lt;br /&gt;
&lt;br /&gt;
|optName1= point&lt;br /&gt;
&lt;br /&gt;
|optType2= &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|varExamples= mist.utils.getDir(mist.vec.sub(point1, point2))&lt;br /&gt;
&lt;br /&gt;
|rtnExamples= Angle in radians&lt;br /&gt;
&lt;br /&gt;
|example= If given two points and using mist.vec.sub to get the line vector, the line &amp;quot;drawn&amp;quot; from p2 to p1. &lt;br /&gt;
&lt;br /&gt;
  local p1 = mist.utils.makeVec3GL(trigger.misc.getZone('z1').point)&lt;br /&gt;
  local p2 = mist.utils.makeVec3GL(trigger.misc.getZone('z2').point)&lt;br /&gt;
  local dir = mist.utils.getDir(mist.vec.sub(p1, p2))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|notes= mist.getNorthCorrection is part of this function only if the optional variable is passed. &lt;br /&gt;
&lt;br /&gt;
With mist 4.0.59 the point variable is optional to allow for returning a &amp;quot;raw&amp;quot; heading between two points. &lt;br /&gt;
&lt;br /&gt;
|funcs= {{listOfMistUnitOrientation}}&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
[[Category: MIST|getDir]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>