<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference%3AMath.inc</id>
	<title>Reference:Math.inc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.povray.org/content?action=history&amp;feed=atom&amp;title=Reference%3AMath.inc"/>
	<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Math.inc&amp;action=history"/>
	<updated>2026-04-04T04:37:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=9342&amp;oldid=prev</id>
		<title>Jholsenback: typo</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=9342&amp;oldid=prev"/>
		<updated>2017-07-26T10:48:01Z</updated>

		<summary type="html">&lt;p&gt;typo&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:48, 26 July 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l154&quot; &gt;Line 154:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 154:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#indexentry:adj_range2}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{#indexentry:adj_range2}}&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: #202122; 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;lt;p&amp;gt;&amp;lt;code&amp;gt;adj_range2(V, InMin, InMax, OutMin, OutMax)&amp;lt;/code&amp;gt;: Like &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;f_range&lt;/del&gt;()&amp;lt;/code&amp;gt;, but adjusts input values in the range &amp;lt;code&amp;gt;[InMin, InMax]&amp;lt;/code&amp;gt; to the range &amp;lt;code&amp;gt;[OutMin, OutMax]&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;lt;p&amp;gt;&amp;lt;code&amp;gt;adj_range2(V, InMin, InMax, OutMin, OutMax)&amp;lt;/code&amp;gt;: Like &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;adj_range&lt;/ins&gt;()&amp;lt;/code&amp;gt;, but adjusts input values in the range &amp;lt;code&amp;gt;[InMin, InMax]&amp;lt;/code&amp;gt; to the range &amp;lt;code&amp;gt;[OutMin, OutMax]&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&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;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&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;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=6930&amp;oldid=prev</id>
		<title>Jholsenback: 1 revision: Reference Migration Initial Load</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=6930&amp;oldid=prev"/>
		<updated>2012-03-15T19:07:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Reference Migration Initial Load&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:07, 15 March 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
	<entry>
		<id>https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=6929&amp;oldid=prev</id>
		<title>Jholsenback: 1 revision: Initial Load (TF)</title>
		<link rel="alternate" type="text/html" href="https://wiki.povray.org/content?title=Reference:Math.inc&amp;diff=6929&amp;oldid=prev"/>
		<updated>2012-03-11T22:31:20Z</updated>

		<summary type="html">&lt;p&gt;1 revision: Initial Load (TF)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Include Files]]&lt;br /&gt;
&amp;lt;p&amp;gt;This file contains many general math functions and macros.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Float functions and macros====&lt;br /&gt;
{{#indexentry:even}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;even(N)&amp;lt;/code&amp;gt;: A function to test whether N is even, returns 1 when true, 0 when false.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = Input value&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:odd}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;odd(N)&amp;lt;/code&amp;gt;: A function to test whether N is odd, returns 1 when true, 0 when false.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; = Input value&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Interpolate, macro}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Interpolate(GC, GS, GE, TS, TE, Method)&amp;lt;/code&amp;gt;: Interpolation macro, interpolates between the float values &amp;lt;code&amp;gt;TS&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;TE&amp;lt;/code&amp;gt;. The method of interpolation is cosine, linear or exponential. The position where to evaluate the interpolation is determined by the position of &amp;lt;code&amp;gt;GC&amp;lt;/code&amp;gt; in the range &amp;lt;code&amp;gt;GS&amp;lt;/code&amp;gt; - &amp;lt;code&amp;gt;GE&amp;lt;/code&amp;gt;. See the example below.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;GC&amp;lt;/code&amp;gt; = global current, float value within the range GS - GE&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;GS&amp;lt;/code&amp;gt; = global start&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;GE&amp;lt;/code&amp;gt; = global end&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;TS&amp;lt;/code&amp;gt; = target start&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;TE&amp;lt;/code&amp;gt; = target end&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Method&amp;lt;/code&amp;gt; = interpolation method, float value:&lt;br /&gt;
		&amp;lt;ul&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Method&amp;lt;/code&amp;gt; &amp;amp;lt; 0 : exponential, using the value of Method as exponent.&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Method&amp;lt;/code&amp;gt; = 0 : cosine interpolation.&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Method&amp;lt;/code&amp;gt; &amp;amp;gt; 0 : exponential, using the value of Method as exponent.&lt;br /&gt;
			&amp;lt;ul&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Method&amp;lt;/code&amp;gt; = 1 : linear interpolation,&amp;lt;/li&amp;gt;&lt;br /&gt;
			&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
		&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#declare A = Interpolate(0.5, 0, 1, 0, 10, 1);&lt;br /&gt;
#debug str(A,0,2)&lt;br /&gt;
// result A = 5.00&lt;br /&gt;
&lt;br /&gt;
#declare A = Interpolate(0.0,-2, 2, 0, 10, 1);&lt;br /&gt;
#debug str(A,0,2)&lt;br /&gt;
// result A = 5.00&lt;br /&gt;
&lt;br /&gt;
#declare A = Interpolate(0.5, 0, 1, 0, 10, 2);&lt;br /&gt;
#debug str(A,0,2)  &lt;br /&gt;
// result A = 2.50&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Mean}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Mean(A)&amp;lt;/code&amp;gt;: A macro to compute the average of an array of values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; = An array of float or vector values.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Std_Dev}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Std_Dev(A, M)&amp;lt;/code&amp;gt;: A macro to compute the standard deviation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; = An array of float values.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;M&amp;lt;/code&amp;gt; = Mean of the floats in the array.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:GetStats}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;GetStats(A)&amp;lt;/code&amp;gt;: This macro declares a global array named &amp;lt;code&amp;gt;StatisticsArray&amp;lt;/code&amp;gt; containing: N, Mean, Min, Max, and Standard Deviation&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; = An array of float values.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Histogram}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Histogram(ValArr, Intervals)&amp;lt;/code&amp;gt;: This macro declares a global, 2D array named &amp;lt;code&amp;gt;HistogramArray&amp;lt;/code&amp;gt;. The first value in the array is the center of the interval/bin, the second the number of values in that interval.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;ValArr&amp;lt;/code&amp;gt; = An array with values.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Intervals&amp;lt;/code&amp;gt; = The desired number of intervals/bins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:sind}}&lt;br /&gt;
{{#indexentry:cosd}}&lt;br /&gt;
{{#indexentry:tand}}&lt;br /&gt;
{{#indexentry:asind}}&lt;br /&gt;
{{#indexentry:acosd}}&lt;br /&gt;
{{#indexentry:atand}}&lt;br /&gt;
{{#indexentry:atan2d}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;sind(v), cosd(v), tand(v), asind(v), acosd(v), atand(v), atan2d(a, b)&amp;lt;/code&amp;gt;: These functions are versions of the&lt;br /&gt;
trigonometric functions using degrees, instead of radians, as the angle unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;The same as for the analogous built-in trig function.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:max3}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;max3(a, b, c)&amp;lt;/code&amp;gt;: A function to find the largest of three numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;a, b, c&amp;lt;/code&amp;gt; = Input values.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:min3}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;min3(a, b, c)&amp;lt;/code&amp;gt;: A function to find the smallest of three numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;a, b, c&amp;lt;/code&amp;gt; = Input values.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:f_sqr}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;f_sqr(v)&amp;lt;/code&amp;gt;: A function to square a number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;v&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:sgn}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;sgn(v)&amp;lt;/code&amp;gt;: A function to show the sign of the number. Returns -1 or 1 depending on the sign of v.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;v&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:clip}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;clip(V, Min, Max)&amp;lt;/code&amp;gt;: A function that limits a value to a specific range, if it goes outside that range it is &amp;lt;em&amp;gt;clipped&amp;lt;/em&amp;gt;. Input values larger than &amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt; will return &amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt;, those less than &amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt; will return &amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt; = Minimum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt; = Maximum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:clamp}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;clamp(V, Min, Max)&amp;lt;/code&amp;gt;: A function that limits a value to a specific range, if it goes outside that range it is &amp;lt;em&amp;gt;clamped&amp;lt;/em&amp;gt; to this range, wrapping around. As the input increases or decreases outside the given range, the output will&lt;br /&gt;
repeatedly sweep through that range, making a &amp;lt;em&amp;gt;sawtooth&amp;lt;/em&amp;gt; waveform.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt; = Minimum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt; = Maximum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:adj_range}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;adj_range(V, Min, Max)&amp;lt;/code&amp;gt;: A function that adjusts input values in the range [0, 1] to a given range. An input value of 0 will return &amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt;, 1 will return &amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt;, and values outside the [0, 1] range will be linearly extrapolated (the graph will continue in a straight line).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt; = Minimum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt; = Maximum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:adj_range2}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;adj_range2(V, InMin, InMax, OutMin, OutMax)&amp;lt;/code&amp;gt;: Like &amp;lt;code&amp;gt;f_range()&amp;lt;/code&amp;gt;, but adjusts input values in the range &amp;lt;code&amp;gt;[InMin, InMax]&amp;lt;/code&amp;gt; to the range &amp;lt;code&amp;gt;[OutMin, OutMax]&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input value.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;InMin&amp;lt;/code&amp;gt; = Minimum of input range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;InMax&amp;lt;/code&amp;gt; = Maximum of input range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;OutMin&amp;lt;/code&amp;gt; = Minimum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;OutMax&amp;lt;/code&amp;gt; = Maximum of output range.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Vector functions and macros====&lt;br /&gt;
&amp;lt;p&amp;gt;These are all macros in the current version because functions can not take vector parameters, but this may change in the future.&amp;lt;/p&amp;gt;&lt;br /&gt;
{{#indexentry:VSqr}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VSqr(V)&amp;lt;/code&amp;gt;: Square each individual component of a vector, equivalent to &amp;lt;code&amp;gt;V*V&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Vector to be squared.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VPow}}&lt;br /&gt;
{{#indexentry:VPow5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VPow(V, P), VPow5D(V, P)&amp;lt;/code&amp;gt;: Raise each individual component of a vector to a given power.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;P&amp;lt;/code&amp;gt; = Power.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VEq}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VEq(V1, V2)&amp;lt;/code&amp;gt;: Tests for equal vectors, returns true if all three components of &amp;lt;code&amp;gt;V1&amp;lt;/code&amp;gt;equal the respective components of &amp;lt;code&amp;gt;V2&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = The vectors to be compared.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VEq5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VEq5D(V1, V2)&amp;lt;/code&amp;gt;: A 5D version of &amp;lt;code&amp;gt;VEq()&amp;lt;/code&amp;gt;. Tests for equal vectors, returns true if all 5 components of &amp;lt;code&amp;gt;V1 &amp;lt;/code&amp;gt;equal the respective components of &amp;lt;code&amp;gt;V2&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = The vectors to be compared.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VZero}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VZero(V)&amp;lt;/code&amp;gt;: Tests for a &amp;amp;lt; 0, 0, 0&amp;amp;gt; vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VZero5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VZero5D(V)&amp;lt;/code&amp;gt;: Tests for a &amp;amp;lt; 0, 0, 0, 0, 0&amp;amp;gt; vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VLength5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VLength5D(V)&amp;lt;/code&amp;gt;: Computes the length of a 5D vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VNormalize5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VNormalize5D(V)&amp;lt;/code&amp;gt;: Normalizes a 5D vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VDot5D}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VDot5D(V1, V2)&amp;lt;/code&amp;gt;: Computes the dot product of two 5D vectors. See vdot() for more information on dot products.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VCos_Angle}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VCos_Angle(V1, V2)&amp;lt;/code&amp;gt;: Compute the cosine of the angle between two vectors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VAngle}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VAngle(V1, V2), VAngleD(V1, V2)&amp;lt;/code&amp;gt;: Compute the angle between two vectors. &amp;lt;code&amp;gt;VAngle()&amp;lt;/code&amp;gt; returns the angle in radians, &amp;lt;code&amp;gt;VAngleD()&amp;lt;/code&amp;gt; in degrees.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VRotation}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VRotation(V1, V2, Axis)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;VRotationD(V1, V2, Axis)&amp;lt;/code&amp;gt;: Compute the rotation angle from V1 to V2 around Axis. Axis should be perpendicular to both V1 and V2. The output will be in the range between -pi and pi radians or between -180 degrees and 180 degrees if you are using the degree version. However, if Axis is set to &amp;amp;lt;0,0,0&amp;amp;gt; the output will always be positive or zero, the same result you will get with the VAngle() macros.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VDist}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VDist(V1, V2)&amp;lt;/code&amp;gt;: Compute the distance between two points.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VPerp_To_Vector}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VPerp_To_Vector(V)&amp;lt;/code&amp;gt;: Find a vector perpendicular to the given vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VPerp_To_Plane}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VPerp_To_Plane(V1, V2)&amp;lt;/code&amp;gt;: Find a vector perpendicular to both given vectors. In other words, perpendicular to the plane defined by the two input vectors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, V2&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VPerp_Adjust}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VPerp_Adjust(V1, Axis)&amp;lt;/code&amp;gt;: Find a vector perpendicular to Axis and in the plane of V1 and Axis. In other words, the new vector is a version of V1 adjusted to be perpendicular to Axis.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, Axis&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VProject_Plane}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VProject_Plane(V1, Axis)&amp;lt;/code&amp;gt;: Project vector V1 onto the plane defined by Axis.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Axis&amp;lt;/code&amp;gt; = Normal of the plane.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VProject_Axis}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VProject_Axis(V1, Axis)&amp;lt;/code&amp;gt;: Project vector V1 onto the axis defined by Axis.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V1, Axis&amp;lt;/code&amp;gt; = Input vectors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VMin}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VMin(V), VMax(V)&amp;lt;/code&amp;gt;: Find the smallest or largest component of a vector.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Input vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:VWith_Len}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;VWith_Len(V, Len)&amp;lt;/code&amp;gt;: Create a vector parallel to a given vector but with a given length.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;V&amp;lt;/code&amp;gt; = Direction vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Len&amp;lt;/code&amp;gt; = Length of desired vector.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Vector Analysis====&lt;br /&gt;
{{#indexentry:SetGradientAccuracy}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;SetGradientAccuracy(Value)&amp;lt;/code&amp;gt;: All the macros below make use of a constant named &amp;lt;em&amp;gt;__Gradient_Fn_Accuracy_&amp;lt;/em&amp;gt; for numerical approximation of the derivatives. This constant can be changed with the macro, the default value is 0.001.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:fn_Gradient}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;fn_Gradient(Fn)&amp;lt;/code&amp;gt;: A macro calculating the gradient of a function as a function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fn&amp;lt;/code&amp;gt; = function to calculate the gradient from.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the length of the gradient as a function.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:fn_Gradient_Directional}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;fn_Gradient_Directional(Fn, Dir)&amp;lt;/code&amp;gt;: A macro calculating the gradient of a function in one direction as a function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fn&amp;lt;/code&amp;gt; = function to calculate the gradient from.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Dir&amp;lt;/code&amp;gt; = direction to calculate the gradient.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the gradient in that direction as a function.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:fn_Divergence}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;fn_Divergence(Fnx, Fny, Fnz)&amp;lt;/code&amp;gt;: A macro calculating the divergence of a (vector) function as a function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fnx, Fny, Fnz&amp;lt;/code&amp;gt;= x, y and z components of a vector function.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the divergence as a function.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:vGradient}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;vGradient(Fn, p0)&amp;lt;/code&amp;gt;: A macro calculating the gradient of a function as a vector expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fn&amp;lt;/code&amp;gt; = function to calculate the gradient from.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;p0&amp;lt;/code&amp;gt; = point where to calculate the gradient.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the gradient as a vector expression.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:vCurl}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;vCurl(Fnx, Fny, Fnz, p0)&amp;lt;/code&amp;gt;: A macro calculating the curl of a (vector) function as a vector expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fnx, Fny, Fnz&amp;lt;/code&amp;gt; = x, y and z components of a vector function.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;p0&amp;lt;/code&amp;gt; = point where to calculate the gradient.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the curl as a vector expression&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Divergence}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Divergence(Fnx, Fny, Fnz, p0)&amp;lt;/code&amp;gt;: A macro calculating the divergence of a (vector) function as a float expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fnx, Fny, Fnz&amp;lt;/code&amp;gt; = x, y and z components of a vector function.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;p0&amp;lt;/code&amp;gt; = point where to calculate the gradient.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the divergence as a float expression.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Gradient_Length}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Gradient_Length(Fn, p0)&amp;lt;/code&amp;gt;: A macro calculating the length of the gradient of a function as a float expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fn&amp;lt;/code&amp;gt; = function to calculate the gradient from.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;p0&amp;lt;/code&amp;gt; = point where to calculate the gradient.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the length of the gradient as a float expression.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{#indexentry:Gradient_Directional}}&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;code&amp;gt;Gradient_Directional(Fn, p0, Dir)&amp;lt;/code&amp;gt;: A macro calculating the gradient of a function in one direction as a float expression.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Parameters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Fn&amp;lt;/code&amp;gt; = function to calculate the gradient from.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;p0&amp;lt;/code&amp;gt; = point where to calculate the gradient.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;Dir&amp;lt;/code&amp;gt; = direction to calculate the gradient.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Output: the gradient in that direction as a float expression&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jholsenback</name></author>
	</entry>
</feed>