# C1.Util.DX.DXUtil.Lerp

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DXUtil_Lerp_" data-uid="C1.Util.DX.DXUtil.Lerp*">Lerp Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DXUtil_Lerp_" data-uid="C1.Util.DX.DXUtil.Lerp*"></a>
<h4 id="C1_Util_DX_DXUtil_Lerp_System_Double_System_Double_System_Double_" data-uid="C1.Util.DX.DXUtil.Lerp(System.Double,System.Double,System.Double)">Lerp(double, double, double)</h4>
<div class="markdown level1 summary"><p>Interpolates between two values using a linear function by a given amount.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static double Lerp(double from, double to, double amount)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Lerp(from As Double, [to] As Double, amount As Double) As Double</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">from</span></td>
      <td><p>Value to interpolate from.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">to</span></td>
      <td><p>Value to interpolate to.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">amount</span></td>
      <td><p>Interpolation amount.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><p>The result of linear interpolation of values based on the amount.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DXUtil_Lerp_System_Double_System_Double_System_Double__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>See <a href="http://www.encyclopediaofmath.org/index.php/Linear_interpolation">http://www.encyclopediaofmath.org/index.php/Linear_interpolation</a> and
<a href="http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/">http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/</a></p>
</div>


<a id="C1_Util_DX_DXUtil_Lerp_" data-uid="C1.Util.DX.DXUtil.Lerp*"></a>
<h4 id="C1_Util_DX_DXUtil_Lerp_System_Single_System_Single_System_Single_" data-uid="C1.Util.DX.DXUtil.Lerp(System.Single,System.Single,System.Single)">Lerp(float, float, float)</h4>
<div class="markdown level1 summary"><p>Interpolates between two values using a linear function by a given amount.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static float Lerp(float from, float to, float amount)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Lerp(from As Single, [to] As Single, amount As Single) As Single</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">from</span></td>
      <td><p>Value to interpolate from.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">to</span></td>
      <td><p>Value to interpolate to.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">amount</span></td>
      <td><p>Interpolation amount.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><p>The result of linear interpolation of values based on the amount.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DXUtil_Lerp_System_Single_System_Single_System_Single__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>See <a href="http://www.encyclopediaofmath.org/index.php/Linear_interpolation">http://www.encyclopediaofmath.org/index.php/Linear_interpolation</a> and
<a href="http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/">http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/</a></p>
</div>
</div>
