<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kayl+712</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kayl+712"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Kayl_712"/>
	<updated>2026-04-24T02:14:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24780</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24780"/>
		<updated>2010-12-18T21:57:45Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration, or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.0&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-linear.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-sincurve.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-coscurve.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] have been extracted from [http://doc.qt.nokia.com/latest/qeasingcurve.html Qt documentation]. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile of the acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24779</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24779"/>
		<updated>2010-12-18T21:46:29Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Easing functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.0&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;center&amp;quot;&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-linear.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinquad.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinelastic.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinback.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-inoutbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-outinbounce.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-sincurve.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[[File:Qeasingcurve-coscurve.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] have been extracted from [http://doc.qt.nokia.com/latest/qeasingcurve.html Qt documentation]. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-coscurve.png&amp;diff=24778</id>
		<title>File:Qeasingcurve-coscurve.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-coscurve.png&amp;diff=24778"/>
		<updated>2010-12-18T21:40:20Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-sincurve.png&amp;diff=24777</id>
		<title>File:Qeasingcurve-sincurve.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-sincurve.png&amp;diff=24777"/>
		<updated>2010-12-18T21:40:04Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinbounce.png&amp;diff=24776</id>
		<title>File:Qeasingcurve-outinbounce.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinbounce.png&amp;diff=24776"/>
		<updated>2010-12-18T21:39:41Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutbounce.png&amp;diff=24775</id>
		<title>File:Qeasingcurve-inoutbounce.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutbounce.png&amp;diff=24775"/>
		<updated>2010-12-18T21:39:22Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outbounce.png&amp;diff=24774</id>
		<title>File:Qeasingcurve-outbounce.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outbounce.png&amp;diff=24774"/>
		<updated>2010-12-18T21:39:04Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inbounce.png&amp;diff=24773</id>
		<title>File:Qeasingcurve-inbounce.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inbounce.png&amp;diff=24773"/>
		<updated>2010-12-18T21:38:46Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinback.png&amp;diff=24772</id>
		<title>File:Qeasingcurve-outinback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinback.png&amp;diff=24772"/>
		<updated>2010-12-18T21:38:07Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutback.png&amp;diff=24771</id>
		<title>File:Qeasingcurve-inoutback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutback.png&amp;diff=24771"/>
		<updated>2010-12-18T21:37:49Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outback.png&amp;diff=24770</id>
		<title>File:Qeasingcurve-outback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outback.png&amp;diff=24770"/>
		<updated>2010-12-18T21:37:24Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inback.png&amp;diff=24769</id>
		<title>File:Qeasingcurve-inback.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inback.png&amp;diff=24769"/>
		<updated>2010-12-18T21:37:04Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinelastic.png&amp;diff=24768</id>
		<title>File:Qeasingcurve-outinelastic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinelastic.png&amp;diff=24768"/>
		<updated>2010-12-18T21:36:43Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutelastic.png&amp;diff=24767</id>
		<title>File:Qeasingcurve-inoutelastic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutelastic.png&amp;diff=24767"/>
		<updated>2010-12-18T21:36:19Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outelastic.png&amp;diff=24766</id>
		<title>File:Qeasingcurve-outelastic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outelastic.png&amp;diff=24766"/>
		<updated>2010-12-18T21:35:43Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inelastic.png&amp;diff=24765</id>
		<title>File:Qeasingcurve-inelastic.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inelastic.png&amp;diff=24765"/>
		<updated>2010-12-18T21:35:12Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinquad.png&amp;diff=24764</id>
		<title>File:Qeasingcurve-outinquad.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outinquad.png&amp;diff=24764"/>
		<updated>2010-12-18T21:34:37Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutquad.png&amp;diff=24763</id>
		<title>File:Qeasingcurve-inoutquad.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inoutquad.png&amp;diff=24763"/>
		<updated>2010-12-18T21:34:13Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outquad.png&amp;diff=24762</id>
		<title>File:Qeasingcurve-outquad.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-outquad.png&amp;diff=24762"/>
		<updated>2010-12-18T21:32:49Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inquad.png&amp;diff=24761</id>
		<title>File:Qeasingcurve-inquad.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-inquad.png&amp;diff=24761"/>
		<updated>2010-12-18T21:32:07Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-linear.png&amp;diff=24760</id>
		<title>File:Qeasingcurve-linear.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=File:Qeasingcurve-linear.png&amp;diff=24760"/>
		<updated>2010-12-18T21:30:44Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24757</id>
		<title>MoveObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24757"/>
		<updated>2010-12-17T12:34:19Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will smoothly move an object from its current position to a specified rotation and position.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool moveObject ( object theObject, int time, float targetx, float targety, float targetz, [ float moverx, float movery, float moverz, string strEasingType, float fEasingPeriod, float fEasingAmplitude, float fEasingOvershoot ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theObject:''' The object that will be moved.&lt;br /&gt;
* '''time:''' The time in milliseconds the object will arrive at the destination.&lt;br /&gt;
* '''targetx:''' The X value of the target position&lt;br /&gt;
* '''targety:''' The Y value of the target position&lt;br /&gt;
* '''targetz:''' The Z value of the target position&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
* '''moverx:''' The rotation along the X axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''movery:''' The rotation along the Y axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''moverz:''' The rotation along the Z axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
{{New feature|33.0110|1.1|&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation (default is &amp;quot;Linear&amp;quot;)&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function moved the object succesfully, and returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example moves every object in the game up 100 units in ten seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
allObjects = getElementsByType ( &amp;quot;object&amp;quot; )&lt;br /&gt;
for key, theObject in ipairs ( allObjects ) do&lt;br /&gt;
	local origX, origY, origZ = getElementPosition ( theObject ) --get the origanal position&lt;br /&gt;
	local newZ = origZ + 100 -- make a new z position&lt;br /&gt;
	moveObject ( theObject, 10000, origX, origY, newZ ) --move the object to this position in 10 seconds.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 2:''' This example created a model (of a bed) near a player called ''someguy'', if they exist in the game. It will then move the model towards the player over 3 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find a player called 'someguy'&lt;br /&gt;
someGuy = getPlayerFromNick ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
-- If a player called someguy was found then&lt;br /&gt;
if ( someGuy ) then&lt;br /&gt;
	-- Get the player's position&lt;br /&gt;
	x, y, z = getElementPosition ( someGuy )&lt;br /&gt;
	-- Create a bed (1700) object near to the player&lt;br /&gt;
	bed = createObject ( 1700, x + 5, y, z )&lt;br /&gt;
	-- Move the bed towards the player over 3 seconds (3000 milliseconds)&lt;br /&gt;
	moveObject ( bed, 3000, x, y, z )&lt;br /&gt;
	-- Tell the player in the chat box&lt;br /&gt;
	outputChatBox ( &amp;quot;Moving a bed towards you!&amp;quot;, someGuy )&lt;br /&gt;
else&lt;br /&gt;
	-- Tell everyone that a player called 'someguy' could not be found&lt;br /&gt;
	outputChatBox ( &amp;quot;Player someguy doesn't exist&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 3:''' This example creates a ball moving (in front of CJ's house in Grove Street) using easing functions. Test command is &amp;quot;/smove&amp;quot; for instance &amp;quot;/smove OutBounce&amp;quot;. This example is a serverside code but the same could be done clientside (adapting the command handler)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local START_POS = {2497.203125, -1672.4864501953, 12.640947341919}&lt;br /&gt;
local STOP_POS = {2480.2595214844, -1666.521484375, 12.640114784241}&lt;br /&gt;
local MOTION_DURATION = 5000&lt;br /&gt;
local WAIT_DURATION = 1000&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;smove&amp;quot;,&lt;br /&gt;
function (player, cmd, strEasingType, period, amplitude, overshoot)&lt;br /&gt;
	local x, y, z = unpack(START_POS)&lt;br /&gt;
	local object = createObject(1598, x, y, z)&lt;br /&gt;
	x, y, z = unpack(STOP_POS)&lt;br /&gt;
	&lt;br /&gt;
	period = period or 0.3&lt;br /&gt;
	amplitude = amplitude or 1.0&lt;br /&gt;
	overshoot = overshoot or 1.70158&lt;br /&gt;
	&lt;br /&gt;
	outputChatBox(string.format(&amp;quot;Server Easing %s %s %s %s&amp;quot;, strEasingType, tostring(period), tostring(amplitude), tostring(overshoot)))&lt;br /&gt;
	moveObject(object, MOTION_DURATION, x, y, z, 0, 0, 360, strEasingType, period, amplitude, overshoot)&lt;br /&gt;
	setTimer(destroyElement, MOTION_DURATION+WAIT_DURATION, 1, object)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Object functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24756</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24756"/>
		<updated>2010-12-17T12:28:23Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Easing functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.0&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] have been extracted from [http://doc.qt.nokia.com/latest/qeasingcurve.html Qt documentation]. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24752</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24752"/>
		<updated>2010-12-17T11:42:27Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] have been extracted from [http://doc.qt.nokia.com/latest/qeasingcurve.html Qt documentation]. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24751</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24751"/>
		<updated>2010-12-17T11:41:49Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] have been extracted from [http://doc.qt.nokia.com/latest/qeasingcurve.html|Qt documentation]. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24750</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24750"/>
		<updated>2010-12-17T11:40:25Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* ''&amp;quot;Linear&amp;quot;'' can be used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* ''&amp;quot;OutElastic&amp;quot;'' can define ''fEasingPeriod'' and ''fEasingAmplitude'' so it can be used with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* ''&amp;quot;InBack&amp;quot;'' can define ''fEasingOvershoot'', but since it comes after ''fEasingPeriod'' and ''fEasingAmplitude'' in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values are (when a function can use a parameter but it's not defined by the user):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24749</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24749"/>
		<updated>2010-12-17T11:31:31Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Easing functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values (when a function can use a parameter but it's not defined are):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to elastic effect, this easing function produces some values &amp;lt; 0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt; 0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Due to overshoot, this easing function produces some values &amp;lt;0 and &amp;gt; 1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function doesn't end at 1 but goes back to 0. In this case, for interpolation, the target value is just an edge but doesn't represent the stop value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This easing function both starts and stops at 0.5, going first to 1 then 0. In this case, for interpolation, the source and target values are just the edges but don't represent the start/stop values.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24748</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24748"/>
		<updated>2010-12-17T11:14:37Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Easing functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values (when a function can use a parameter but it's not defined are):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24747</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24747"/>
		<updated>2010-12-17T11:14:15Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
= Preliminary note =&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
= Easing functions =&lt;br /&gt;
&lt;br /&gt;
Default values (when a function can use a parameter but it's not defined are):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function (strEasingType)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInElastic&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBack&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InOutBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OutInBounce&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CosineCurve&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Source =&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
The pictures of the easing functions are directly extracted from Qt documentation, © 2008-2010 Nokia Corporation and/or its subsidiaries.&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24746</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24746"/>
		<updated>2010-12-17T10:56:15Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Easing functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
&lt;br /&gt;
== Preliminary note ==&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
== Easing functions ==&lt;br /&gt;
&lt;br /&gt;
Default values (when a function can use a parameter but it's not defined are):&lt;br /&gt;
* ''fEasingPeriod:'' 0.3&lt;br /&gt;
* ''fEasingAmplitude :'' 1.&lt;br /&gt;
* ''fEasingOvershoot:'' 1.701&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function (strEasingType)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingPeriod&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingAmplitude&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Uses fEasingOvershoot&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24745</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24745"/>
		<updated>2010-12-17T10:54:58Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
&lt;br /&gt;
== Preliminary note ==&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
== Easing functions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot; class=&amp;quot;unnamed1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Easing function (strEasingType)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Function profile&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Can use fEasingPeriod (default 0.3)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Can use fEasingAmplitude (default 1.0)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Can use fEasingOvershoot(default 1.7015)&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Comments&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Linear&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;InQuad&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24744</id>
		<title>Easing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Easing&amp;diff=24744"/>
		<updated>2010-12-17T10:48:57Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: Created page with &amp;quot;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.  The most basic one, linear, is just a linear interpolation at constant speed. ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Easing functions describe functions that control the way an interpolation between 0 and 1 is done.&lt;br /&gt;
&lt;br /&gt;
The most basic one, linear, is just a linear interpolation at constant speed. Other more advanced easing functions can have acceleration at the beginning, the end or both, or deceleration , or even bouncing or elastic effects.&lt;br /&gt;
&lt;br /&gt;
The naming conventions of the functions below, available in [[moveObject]], [[interpolateBetween]], or [[getEasingValue]] as been extracted from http://doc.qt.nokia.com/latest/qeasingcurve.html. Only a subset of those functions is available in MTA since some of them are a bit redundant (only the profile or acceleration/deceleration changes).&lt;br /&gt;
&lt;br /&gt;
In the functions using easing, there are usually 3 optional parameters. Most functions don't need them at all, the ones needing one or more parameters are listed in the table below. When providing optional parameters, all the parameters before a given parameter must be filled, even if the easing function you intend to use doesn't require such a parameter. In this case, simply use 0 for the parameters you don't need.&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;quot;Linear&amp;quot; can used simply with ''getEasingValue( fProgress, &amp;quot;Linear&amp;quot; )''&lt;br /&gt;
* &amp;quot;OutElastic&amp;quot; can define fEasingPeriod and fEasingAmplitude with ''getEasingValue( fProgress, &amp;quot;OutElastic&amp;quot;, 0.3, 1.0 )''&lt;br /&gt;
* &amp;quot;InBack&amp;quot; can define fEasingOvershoot, but since it comes after fEasingPeriod and fEasingAmplitude in the order of parameters, 0 must be used for the others with ''getEasingValue( fProgress, &amp;quot;InBack&amp;quot;, 0, 0, 1.7015 )''&lt;br /&gt;
&lt;br /&gt;
== Easing functions ==&lt;br /&gt;
&lt;br /&gt;
(table to come)&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24743</id>
		<title>MoveObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24743"/>
		<updated>2010-12-17T10:22:05Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will smoothly move an object from its current position to a specified rotation and position.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool moveObject ( object theObject, int time, float targetx, float targety, float targetz, [ float moverx, float movery, float moverz, string strEasingType, float fEasingPeriod, float fEasingAmplitude, float fEasingOvershoot ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theObject:''' The object that will be moved.&lt;br /&gt;
* '''time:''' The time in milliseconds the object will arrive at the destination.&lt;br /&gt;
* '''targetx:''' The X value of the target position&lt;br /&gt;
* '''targety:''' The Y value of the target position&lt;br /&gt;
* '''targetz:''' The Z value of the target position&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
* '''moverx:''' The rotation along the X axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''movery:''' The rotation along the Y axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''moverz:''' The rotation along the Z axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
{{New feature|33.0110|1.1|&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation (default is &amp;quot;Linear&amp;quot;)&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function moved the object succesfully, and returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example moves every object in the game up 100 units in ten seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
allObjects = getElementsByType ( &amp;quot;object&amp;quot; )&lt;br /&gt;
for key, theObject in ipairs ( allObjects ) do&lt;br /&gt;
	local origX, origY, origZ = getElementPosition ( theObject ) --get the origanal position&lt;br /&gt;
	local newZ = origZ + 100 -- make a new z position&lt;br /&gt;
	moveObject ( theObject, 10000, origX, origY, newZ ) --move the object to this position in 10 seconds.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 2:''' This example created a model (of a bed) near a player called ''someguy'', if they exist in the game. It will then move the model towards the player over 3 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find a player called 'someguy'&lt;br /&gt;
someGuy = getPlayerFromNick ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
-- If a player called someguy was found then&lt;br /&gt;
if ( someGuy ) then&lt;br /&gt;
	-- Get the player's position&lt;br /&gt;
	x, y, z = getElementPosition ( someGuy )&lt;br /&gt;
	-- Create a bed (1700) object near to the player&lt;br /&gt;
	bed = createObject ( 1700, x + 5, y, z )&lt;br /&gt;
	-- Move the bed towards the player over 3 seconds (3000 milliseconds)&lt;br /&gt;
	moveObject ( bed, 3000, x, y, z )&lt;br /&gt;
	-- Tell the player in the chat box&lt;br /&gt;
	outputChatBox ( &amp;quot;Moving a bed towards you!&amp;quot;, someGuy )&lt;br /&gt;
else&lt;br /&gt;
	-- Tell everyone that a player called 'someguy' could not be found&lt;br /&gt;
	outputChatBox ( &amp;quot;Player someguy doesn't exist&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Object functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24742</id>
		<title>MoveObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24742"/>
		<updated>2010-12-17T10:21:41Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will smoothly move an object from its current position to a specified rotation and position.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool moveObject ( object theObject, int time, float targetx, float targety, float targetz, [ float moverx, float movery, float moverz, string strEasingType, float fEasingPeriod, float fEasingAmplitude, float fEasingOvershoot ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theObject:''' The object that will be moved.&lt;br /&gt;
* '''time:''' The time in milliseconds the object will arrive at the destination.&lt;br /&gt;
* '''targetx:''' The X value of the target position&lt;br /&gt;
* '''targety:''' The Y value of the target position&lt;br /&gt;
* '''targetz:''' The Z value of the target position&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
* '''moverx:''' The rotation along the X axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''movery:''' The rotation along the Y axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''moverz:''' The rotation along the Z axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
{{New feature|33.0110|1.1|&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function moved the object succesfully, and returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example moves every object in the game up 100 units in ten seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
allObjects = getElementsByType ( &amp;quot;object&amp;quot; )&lt;br /&gt;
for key, theObject in ipairs ( allObjects ) do&lt;br /&gt;
	local origX, origY, origZ = getElementPosition ( theObject ) --get the origanal position&lt;br /&gt;
	local newZ = origZ + 100 -- make a new z position&lt;br /&gt;
	moveObject ( theObject, 10000, origX, origY, newZ ) --move the object to this position in 10 seconds.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 2:''' This example created a model (of a bed) near a player called ''someguy'', if they exist in the game. It will then move the model towards the player over 3 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find a player called 'someguy'&lt;br /&gt;
someGuy = getPlayerFromNick ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
-- If a player called someguy was found then&lt;br /&gt;
if ( someGuy ) then&lt;br /&gt;
	-- Get the player's position&lt;br /&gt;
	x, y, z = getElementPosition ( someGuy )&lt;br /&gt;
	-- Create a bed (1700) object near to the player&lt;br /&gt;
	bed = createObject ( 1700, x + 5, y, z )&lt;br /&gt;
	-- Move the bed towards the player over 3 seconds (3000 milliseconds)&lt;br /&gt;
	moveObject ( bed, 3000, x, y, z )&lt;br /&gt;
	-- Tell the player in the chat box&lt;br /&gt;
	outputChatBox ( &amp;quot;Moving a bed towards you!&amp;quot;, someGuy )&lt;br /&gt;
else&lt;br /&gt;
	-- Tell everyone that a player called 'someguy' could not be found&lt;br /&gt;
	outputChatBox ( &amp;quot;Player someguy doesn't exist&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Object functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24741</id>
		<title>MoveObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=MoveObject&amp;diff=24741"/>
		<updated>2010-12-17T10:21:17Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function will smoothly move an object from its current position to a specified rotation and position.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool moveObject ( object theObject, int time, float targetx, float targety, float targetz, [ float moverx, float movery, float moverz, string strEasingType, float fEasingPeriod, float fEasingAmplitude, float fEasingOvershoot )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theObject:''' The object that will be moved.&lt;br /&gt;
* '''time:''' The time in milliseconds the object will arrive at the destination.&lt;br /&gt;
* '''targetx:''' The X value of the target position&lt;br /&gt;
* '''targety:''' The Y value of the target position&lt;br /&gt;
* '''targetz:''' The Z value of the target position&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
* '''moverx:''' The rotation along the X axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''movery:''' The rotation along the Y axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
* '''moverz:''' The rotation along the Z axis '''relative''' to its current rotation, which is its starting angle.&lt;br /&gt;
{{New feature|33.0110|1.1|&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the function moved the object succesfully, and returns ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example moves every object in the game up 100 units in ten seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
allObjects = getElementsByType ( &amp;quot;object&amp;quot; )&lt;br /&gt;
for key, theObject in ipairs ( allObjects ) do&lt;br /&gt;
	local origX, origY, origZ = getElementPosition ( theObject ) --get the origanal position&lt;br /&gt;
	local newZ = origZ + 100 -- make a new z position&lt;br /&gt;
	moveObject ( theObject, 10000, origX, origY, newZ ) --move the object to this position in 10 seconds.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 2:''' This example created a model (of a bed) near a player called ''someguy'', if they exist in the game. It will then move the model towards the player over 3 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find a player called 'someguy'&lt;br /&gt;
someGuy = getPlayerFromNick ( &amp;quot;someguy&amp;quot; )&lt;br /&gt;
-- If a player called someguy was found then&lt;br /&gt;
if ( someGuy ) then&lt;br /&gt;
	-- Get the player's position&lt;br /&gt;
	x, y, z = getElementPosition ( someGuy )&lt;br /&gt;
	-- Create a bed (1700) object near to the player&lt;br /&gt;
	bed = createObject ( 1700, x + 5, y, z )&lt;br /&gt;
	-- Move the bed towards the player over 3 seconds (3000 milliseconds)&lt;br /&gt;
	moveObject ( bed, 3000, x, y, z )&lt;br /&gt;
	-- Tell the player in the chat box&lt;br /&gt;
	outputChatBox ( &amp;quot;Moving a bed towards you!&amp;quot;, someGuy )&lt;br /&gt;
else&lt;br /&gt;
	-- Tell everyone that a player called 'someguy' could not be found&lt;br /&gt;
	outputChatBox ( &amp;quot;Player someguy doesn't exist&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Object functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24740</id>
		<title>GetEasingValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24740"/>
		<updated>2010-12-17T10:18:38Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Used for custom LUA based interpolation, returns the easing value (animation time to use in your custom interpolation) given a progress and an [[Easing|easing function]].&lt;br /&gt;
In most cases, either [[moveObject]] or [[interpolateBetween]] can do the job. getEasingValue is only provided in case you want to do your own custom interpolation based on easing.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;fAnimationTime = getEasingValue( fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''fAnimationTime '' the animation time given by the easing function (can be &amp;lt; 0 or &amp;gt; 1 since some [[Easing|easing functions]] have overshoot or bounce/spring effects, ''false'' otherwise (error in parameters).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The example below is only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example uses getEasingValue to make a custom camera fade.&lt;br /&gt;
The command to test it is &amp;quot;/fade&amp;quot;.&lt;br /&gt;
The fading out is done with &amp;quot;InQuad&amp;quot; to have a slow fading which then accelerates and &amp;quot;OutQuad&amp;quot; is used for fading in to have a smooth end of the fading.&lt;br /&gt;
In this example [[interpolateBetween]] could have been used directly to interpolate the alpha between 0 and 255 and then 255 and 0 but is example is just to illustrate the use of getEasingValue by itself.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Fade = nil&lt;br /&gt;
addCommandHandler(&amp;quot;fade&amp;quot;, &lt;br /&gt;
function ()&lt;br /&gt;
	if g_Fade then return end&lt;br /&gt;
	g_Fade = {}&lt;br /&gt;
	g_Fade.startTime = getTickCount()&lt;br /&gt;
	g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
	g_Fade.easingFunction = &amp;quot;InQuad&amp;quot; --Slow at first and accelerating&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function fadeCameraOut()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = fAnimationTime*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
		g_Fade.startTime = getTickCount()&lt;br /&gt;
		g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
		g_Fade.easingFunction = &amp;quot;OutQuad&amp;quot; --Fast at first then decelerating&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function fadeCameraIn()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = (1-fAnimationTime)*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
		&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
		g_Fade = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24739</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24739"/>
		<updated>2010-12-17T10:17:17Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The examples below are only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24738</id>
		<title>GetEasingValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24738"/>
		<updated>2010-12-17T10:17:04Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Used for custom LUA based interpolation, returns the easing value (animation time to use in your custom interpolation) given a progress and an [[Easing|easing function]].&lt;br /&gt;
In most cases, either [[moveObject]] or [[interpolateBetween]] can do the job. getEasingValue is only provided in case you want to do your own custom interpolation based on easing.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;fAnimationTime = getEasingValue( fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''fAnimationTime '' the animation time given by the easing function (can be &amp;lt; 0 or &amp;gt; 1 since some [[Easing|easing functions]] have overshoot or bounce/spring effects, ''false'' otherwise (error in parameters).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The example below is only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example uses getEasingValue to make a custom camera fade.&lt;br /&gt;
The command to test it is &amp;quot;/fade&amp;quot;.&lt;br /&gt;
The fading out is done with &amp;quot;InQuad&amp;quot; to have a slow fading which then accelerates and &amp;quot;OutQuad&amp;quot; is used for fading in to have a smooth end of the fading.&lt;br /&gt;
In this example [[interpolateBetween]] could have been used directly to interpolate the alpha between 0 and 255 and then 255 and 0 but is example is just to illustrate of the use of getEasingValue by itself.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Fade = nil&lt;br /&gt;
addCommandHandler(&amp;quot;fade&amp;quot;, &lt;br /&gt;
function ()&lt;br /&gt;
	if g_Fade then return end&lt;br /&gt;
	g_Fade = {}&lt;br /&gt;
	g_Fade.startTime = getTickCount()&lt;br /&gt;
	g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
	g_Fade.easingFunction = &amp;quot;InQuad&amp;quot; --Slow at first and accelerating&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function fadeCameraOut()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = fAnimationTime*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
		g_Fade.startTime = getTickCount()&lt;br /&gt;
		g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
		g_Fade.easingFunction = &amp;quot;OutQuad&amp;quot; --Fast at first then decelerating&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function fadeCameraIn()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = (1-fAnimationTime)*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
		&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
		g_Fade = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24737</id>
		<title>GetEasingValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetEasingValue&amp;diff=24737"/>
		<updated>2010-12-17T10:15:13Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: Created page with &amp;quot;__NOTOC__ {{Server client function}}  Used for custom LUA based interpolation, returns the easing value (animation time to use in your custom interpolation) given a progress and ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Used for custom LUA based interpolation, returns the easing value (animation time to use in your custom interpolation) given a progress and an [[Easing|easing function]].&lt;br /&gt;
In most cases, either [[moveObject]] or [[interpolateBetween]] can do the job. getEasingValue is only provided in case you want to do your own custom interpolation based on easing.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;fAnimationTime = getEasingValue( fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''fAnimationTime '' the animation time given by the easing function (can be &amp;lt; 0 or &amp;gt; 1 since some [[Easing|easing functions]] have overshoot or bounce/spring effects, ''false'' otherwise (error in parameters).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The example below isonly clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses getEasingValue to make a custom camera fade.&lt;br /&gt;
The command to test it is &amp;quot;/fade&amp;quot;.&lt;br /&gt;
The fading out is done with &amp;quot;InQuad&amp;quot; to have a slow fading which then accelerates and &amp;quot;OutQuad&amp;quot; is used for fading in to have a smooth end of the fading.&lt;br /&gt;
In this example [[interpolateBetween]] could have been used directly to interpolate the alpha between 0 and 255 and then 255 and 0 but is example is just to illustrate of the use of getEasingValue by itself.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Fade = nil&lt;br /&gt;
addCommandHandler(&amp;quot;fade&amp;quot;, &lt;br /&gt;
function ()&lt;br /&gt;
	if g_Fade then return end&lt;br /&gt;
	g_Fade = {}&lt;br /&gt;
	g_Fade.startTime = getTickCount()&lt;br /&gt;
	g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
	g_Fade.easingFunction = &amp;quot;InQuad&amp;quot; --Slow at first and accelerating&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function fadeCameraOut()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = fAnimationTime*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraOut)&lt;br /&gt;
		g_Fade.startTime = getTickCount()&lt;br /&gt;
		g_Fade.endTime = g_Fade.startTime + 2000&lt;br /&gt;
		g_Fade.easingFunction = &amp;quot;OutQuad&amp;quot; --Fast at first then decelerating&lt;br /&gt;
		addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function fadeCameraIn()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Fade.startTime&lt;br /&gt;
	local duration = g_Fade.endTime - g_Fade.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local fAnimationTime = getEasingValue(progress, g_Fade.easingFunction)&lt;br /&gt;
	&lt;br /&gt;
	local alpha = (1-fAnimationTime)*255&lt;br /&gt;
	local width, height = guiGetScreenSize()&lt;br /&gt;
	dxDrawRectangle(0, 0, width, height, tocolor(0, 0, 0, alpha), true)&lt;br /&gt;
		&lt;br /&gt;
	if now &amp;gt; g_Fade.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), fadeCameraIn)&lt;br /&gt;
		g_Fade = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24736</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24736"/>
		<updated>2010-12-17T09:59:36Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The examples below are only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24735</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24735"/>
		<updated>2010-12-17T09:52:26Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The examples below are only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24734</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24734"/>
		<updated>2010-12-17T09:52:14Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
The examples above are only clientside examples even though the function can be used on both sides. Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context.&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24733</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24733"/>
		<updated>2010-12-17T09:50:48Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector/value if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24732</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24732"/>
		<updated>2010-12-17T09:50:35Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector/value&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector/value&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24731</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24731"/>
		<updated>2010-12-17T09:50:13Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Interpolates a 3D Vector between a source value and a target value using either linear interpolation or any other [[Easing|easing function]].&lt;br /&gt;
It can also be used to interpolate 2D vectors or scalars my only setting some of the x, y, z values and putting 0 to the others.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''x1, y1, z1:''' 3D coordinates of source vector&lt;br /&gt;
*'''x2, y2, z2:''' 3D coordinates of target vector&lt;br /&gt;
*'''fProgress:''' float between 0 and 1 indicating the interpolation progress (0 at the beginning of the interpolation, 1 at the end).&lt;br /&gt;
*'''strEasingType:''' the [[Easing|easing function]] to use for the interpolation&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''fEasingPeriod:''' the period of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingAmplitude:''' the amplitude of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
*'''fEasingOvershoot:''' the overshoot of the [[Easing|easing function]] (only some easing functions use this parameter)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''x, y, z'' the interpolated 3D vector if successful, ''false'' otherwise (error in parameters).&lt;br /&gt;
As mentioned before, interpolateBetween can be used on 2D vectors or scalars in which case only some (x, y or just x) of the returned values are to be used (cf. alpha interpolation in marker example or size interpolation in window example).&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24727</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24727"/>
		<updated>2010-12-16T13:31:01Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create position and color interpolation(with effect) on a marker.&lt;br /&gt;
The command to test it is &amp;quot;/marker&amp;quot;.&lt;br /&gt;
The position is interpolated with &amp;quot;OutBounce&amp;quot; as strEasingType to make the marker bounce off the ground and &amp;quot;Linear&amp;quot; interpolation for the color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Marker = nil&lt;br /&gt;
addCommandHandler(&amp;quot;marker&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Marker then return end&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = getElementPosition(getLocalPlayer())&lt;br /&gt;
	z = z - 1&lt;br /&gt;
	&lt;br /&gt;
	g_Marker = {}&lt;br /&gt;
	g_Marker.startPos = {x, y, z + 5}&lt;br /&gt;
	g_Marker.startTime = getTickCount()&lt;br /&gt;
	g_Marker.startColor = {255, 0, 0, 0}&lt;br /&gt;
	g_Marker.endPos = {x, y, z}&lt;br /&gt;
	g_Marker.endTime = g_Marker.startTime + 2000&lt;br /&gt;
	g_Marker.endColor = {0, 0, 255, 255}	&lt;br /&gt;
	&lt;br /&gt;
	local x, y, z = unpack(g_Marker.startPos)&lt;br /&gt;
	local r, g, b, a = unpack(g_Marker.startColor)&lt;br /&gt;
	g_Marker.marker = createMarker(x, y, z, &amp;quot;cylinder&amp;quot;, 1, 255, r, g, b, a)&lt;br /&gt;
		&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function popMarkerUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Marker.startTime&lt;br /&gt;
	local duration = g_Marker.endTime - g_Marker.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
&lt;br /&gt;
	local x1, y1, z1 = unpack(g_Marker.startPos)&lt;br /&gt;
	local x2, y2, z2 = unpack(g_Marker.endPos)&lt;br /&gt;
	local x, y, z = interpolateBetween ( &lt;br /&gt;
		x1, y1, z1,&lt;br /&gt;
		x2, y2, z2, &lt;br /&gt;
		progress, &amp;quot;OutBounce&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setElementPosition(g_Marker.marker, x, y, z)&lt;br /&gt;
			&lt;br /&gt;
	local r1, g1, b1, a1 = unpack(g_Marker.startColor)&lt;br /&gt;
	local r2, g2, b2, a2 = unpack(g_Marker.endColor)&lt;br /&gt;
	local r, g, b = interpolateBetween ( &lt;br /&gt;
		r1, g1, b1,&lt;br /&gt;
		r2, g2, b2, &lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
	local a = interpolateBetween ( &lt;br /&gt;
		a1, 0, 0,&lt;br /&gt;
		a2, 0, 0,&lt;br /&gt;
		progress, &amp;quot;Linear&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	setMarkerColor(g_Marker.marker , r, g, b, a)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Marker.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popMarkerUp)&lt;br /&gt;
		setTimer(&lt;br /&gt;
			function ()&lt;br /&gt;
				destroyElement(g_Marker.marker)&lt;br /&gt;
				g_Marker = nil&lt;br /&gt;
			end, 3000, 1)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24726</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24726"/>
		<updated>2010-12-16T13:27:10Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example on a GUI Window ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Utility functions}}&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24725</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24725"/>
		<updated>2010-12-16T13:25:26Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Example on a GUI Window */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example on a GUI Window ==&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
The command to test it is &amp;quot;/window&amp;quot;.&lt;br /&gt;
When the window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing/elastic effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24724</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24724"/>
		<updated>2010-12-16T13:24:33Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween ( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example on a GUI Window ==&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
Command to test it is &amp;quot;/window&amp;quot;&lt;br /&gt;
When window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24723</id>
		<title>InterpolateBetween</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=InterpolateBetween&amp;diff=24723"/>
		<updated>2010-12-16T13:23:09Z</updated>

		<summary type="html">&lt;p&gt;Kayl 712: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;x, y, z = interpolateBetween( x1, y1, z1, x2, y2, z2, fProgress, strEasingType [, fEasingPeriod, fEasingAmplitude, fEasingOvershoot] )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example on a GUI Window ==&lt;br /&gt;
This clienstide example uses interpolateBetween to create size and position interpolation (with effect) on a gui-window.&lt;br /&gt;
Command to test it is &amp;quot;/window&amp;quot;&lt;br /&gt;
When window pops up it uses &amp;quot;OutElastic&amp;quot; as the strEasingType to create the bouncing effect.&lt;br /&gt;
When it fades away, it uses &amp;quot;InQuad&amp;quot; to have an accelerating fading.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local g_Window = nil&lt;br /&gt;
addCommandHandler(&amp;quot;window&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	if g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	g_Window = {}&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	g_Window.windowWidth, g_Window.windowHeight = 400, 315&lt;br /&gt;
	local left = screenWidth/2 - g_Window.windowWidth/2&lt;br /&gt;
	local top = screenHeight/2 - g_Window.windowHeight/2&lt;br /&gt;
	&lt;br /&gt;
	g_Window.window = guiCreateWindow(left, top, g_Window.windowWidth, g_Window.windowHeight, &amp;quot;Interpolation on GUI&amp;quot;, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.closeBtn = guiCreateButton(320, 285, 75, 23, &amp;quot;Close&amp;quot;, false, g_Window.window)&lt;br /&gt;
		&lt;br /&gt;
	guiWindowSetSizable(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiSetVisible(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {0, 0}&lt;br /&gt;
	g_Window.endSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
function on_closeBtn_clicked(button, state, absoluteX, absoluteY)&lt;br /&gt;
	if (button ~= &amp;quot;left&amp;quot;) or (state ~= &amp;quot;up&amp;quot;) then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if not g_Window then return end&lt;br /&gt;
	&lt;br /&gt;
	showCursor(false)&lt;br /&gt;
	guiSetEnabled(g_Window.window, false)&lt;br /&gt;
	guiWindowSetMovable(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	local posX, posY = guiGetPosition(g_Window.window, false)&lt;br /&gt;
	&lt;br /&gt;
	g_Window.startTime = getTickCount()&lt;br /&gt;
	g_Window.startSize = {g_Window.windowWidth, g_Window.windowHeight}&lt;br /&gt;
	g_Window.startCenter = &lt;br /&gt;
	{&lt;br /&gt;
		posX + g_Window.windowWidth/2,&lt;br /&gt;
		posY + g_Window.windowHeight/2,&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	g_Window.endSize = {0, 0}&lt;br /&gt;
	g_Window.endTime = g_Window.startTime + 1000&lt;br /&gt;
	g_Window.endCenter = &lt;br /&gt;
	{&lt;br /&gt;
		screenWidth, &lt;br /&gt;
		screenHeight&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	addEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowUp()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
		&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;OutElastic&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local screenWidth, screenHeight = guiGetScreenSize()&lt;br /&gt;
	guiSetPosition(g_Window.window, screenWidth/2 - width/2, screenHeight/2 - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if not guiGetVisible(g_Window.window) then&lt;br /&gt;
		guiSetVisible(g_Window.window, true)&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		guiSetEnabled(g_Window.window, true)&lt;br /&gt;
		&lt;br /&gt;
		guiBringToFront(g_Window.window)&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowUp)&lt;br /&gt;
		addEventHandler(&amp;quot;onClientGUIClick&amp;quot;, g_Window.closeBtn, on_closeBtn_clicked, false)&lt;br /&gt;
		showCursor(true)&lt;br /&gt;
		guiWindowSetMovable(g_Window.window, true)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function popWindowDown()&lt;br /&gt;
	local now = getTickCount()&lt;br /&gt;
	local elapsedTime = now - g_Window.startTime&lt;br /&gt;
	local duration = g_Window.endTime - g_Window.startTime&lt;br /&gt;
	local progress = elapsedTime / duration&lt;br /&gt;
	&lt;br /&gt;
	local width, height, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startSize[1], g_Window.startSize[2], 0, &lt;br /&gt;
		g_Window.endSize[1], g_Window.endSize[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
		&lt;br /&gt;
	guiSetSize(g_Window.window, width, height, false)&lt;br /&gt;
	&lt;br /&gt;
	local centerX, centerY, _ = interpolateBetween ( &lt;br /&gt;
		g_Window.startCenter[1], g_Window.startCenter[2], 0, &lt;br /&gt;
		g_Window.endCenter[1], g_Window.endCenter[2], 0, &lt;br /&gt;
		progress, &amp;quot;InQuad&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	guiSetPosition(g_Window.window, centerX - width/2, centerY - height/2, false)&lt;br /&gt;
	&lt;br /&gt;
	if now &amp;gt;= g_Window.endTime then&lt;br /&gt;
		removeEventHandler(&amp;quot;onClientRender&amp;quot;, getRootElement(), popWindowDown)&lt;br /&gt;
		destroyElement(g_Window.window)&lt;br /&gt;
		g_Window = nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kayl 712</name></author>
	</entry>
</feed>