mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 14:48:47 +00:00
1658 lines
72 KiB
HTML
1658 lines
72 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE]><![endif]-->
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Class MathUtility
|
|
| X10D </title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class MathUtility
|
|
| X10D ">
|
|
<meta name="generator" content="docfx 2.56.7.0">
|
|
|
|
<link rel="shortcut icon" href="../images/favicon.png">
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/night-owl.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" integrity="sha384-EvBWSlnoFgZlXJvpzS+MAUEjvN7+gcCwH+qh7GRFOGgZO0PuwOFro7qPOJnLfe7l" crossorigin="anonymous">
|
|
<link rel="stylesheet" href="../styles/config.css">
|
|
<link rel="stylesheet" href="../styles/discord.css">
|
|
<link rel="stylesheet" href="../styles/singulink.css">
|
|
<link rel="stylesheet" href="../styles/main.css">
|
|
<meta property="docfx:navrel" content="../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
<meta property="docfx:rel" content="../">
|
|
<meta property="docfx:newtab" content="true">
|
|
</head>
|
|
<body>
|
|
<div class="top-navbar">
|
|
<a class="burger-icon" onclick="toggleMenu()">
|
|
<svg name="Hamburger" style="vertical-align: middle;" width="34" height="34" viewbox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M20 6H4V9H20V6ZM4 10.999H20V13.999H4V10.999ZM4 15.999H20V18.999H4V15.999Z"></path></svg>
|
|
</a>
|
|
|
|
|
|
<a class="brand" href="../index.html">
|
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|
<span class="brand-title">X10D</span>
|
|
</a> </div>
|
|
|
|
<div class="body-content">
|
|
<div id="blackout" class="blackout" onclick="toggleMenu()"></div>
|
|
|
|
<nav id="sidebar" role="navigation">
|
|
<div class="sidebar">
|
|
|
|
<div>
|
|
<div class="mobile-hide">
|
|
|
|
<a class="brand" href="../index.html">
|
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|
<span class="brand-title">X10D</span>
|
|
</a> </div>
|
|
|
|
<div class="sidesearch">
|
|
<form id="search" role="search" class="search">
|
|
<i class="bi bi-search search-icon"></i>
|
|
<input type="text" id="search-query" placeholder="Search" autocomplete="off">
|
|
</form>
|
|
</div>
|
|
|
|
<div id="navbar">
|
|
</div>
|
|
</div> <div class="sidebar-item-separator"></div>
|
|
|
|
<div id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<strong>DocFX + Singulink = ♥</strong>
|
|
|
|
</div> </nav>
|
|
|
|
<main class="main-panel">
|
|
|
|
<div id="search-results" style="display: none;">
|
|
<h1 class="search-list">Search Results for <span></span></h1>
|
|
<div class="sr-items">
|
|
<p><i class="bi bi-hourglass-split index-loading"></i></p>
|
|
</div>
|
|
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
|
|
</div>
|
|
<div role="main" class="hide-when-search">
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<article class="content wrap" id="_content" data-uid="X10D.Math.MathUtility">
|
|
|
|
|
|
<h1 id="X10D_Math_MathUtility" data-uid="X10D.Math.MathUtility" class="text-break">Class MathUtility
|
|
</h1>
|
|
<div class="markdown level0 summary"><p>Provides static helpers methods for mathematical functions not found in the .NET <see cref="!:System.Math"></see> class.</p>
|
|
</div>
|
|
<div class="markdown level0 conceptual"></div>
|
|
<div class="inheritance">
|
|
<h5>Inheritance</h5>
|
|
<div class="level0"><span class="xref">System.Object</span></div>
|
|
<div class="level1"><span class="xref">MathUtility</span></div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>: <a class="xref" href="X10D.Math.html">X10D.Math</a></h6>
|
|
<h6><strong>Assembly</strong>: X10D.dll</h6>
|
|
<h5 id="X10D_Math_MathUtility_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static class MathUtility : object</code></pre>
|
|
</div>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Bias_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Bias(System.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L154">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Bias_" data-uid="X10D.Math.MathUtility.Bias*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Bias_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.Bias(System.Double,System.Double)">Bias(Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Applies a simple bias function to value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double Bias(double value, double bias)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to which the bias function will be applied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">bias</span></td>
|
|
<td><p>The bias value. Valid values range from 0-1.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The biased result.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_MathUtility_Bias_System_Double_System_Double__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>If <code data-dev-comment-type="paramref" class="paramref">bias</code> is less than 0.5, <code data-dev-comment-type="paramref" class="paramref">value</code> will be shifted downward; otherwise, upward.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Bias_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Bias(System.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L140">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Bias_" data-uid="X10D.Math.MathUtility.Bias*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Bias_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.Bias(System.Single,System.Single)">Bias(Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Applies a simple bias function to value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float Bias(float value, float bias)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to which the bias function will be applied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">bias</span></td>
|
|
<td><p>The bias value. Valid values range from 0-1.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The biased result.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_MathUtility_Bias_System_Single_System_Single__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>If <code data-dev-comment-type="paramref" class="paramref">bias</code> is less than 0.5, <code data-dev-comment-type="paramref" class="paramref">value</code> will be shifted downward; otherwise, upward.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_ExponentialDecay_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.ExponentialDecay(System.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L35">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_ExponentialDecay_" data-uid="X10D.Math.MathUtility.ExponentialDecay*"></a>
|
|
<h4 id="X10D_Math_MathUtility_ExponentialDecay_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.ExponentialDecay(System.Double,System.Double,System.Double)">ExponentialDecay(Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates exponential decay for a value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double ExponentialDecay(double value, double alpha, double decay)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to decay.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>A factor by which to scale the decay.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">decay</span></td>
|
|
<td><p>The decay amount.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The exponentially decayed value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_ExponentialDecay_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.ExponentialDecay(System.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L23">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_ExponentialDecay_" data-uid="X10D.Math.MathUtility.ExponentialDecay*"></a>
|
|
<h4 id="X10D_Math_MathUtility_ExponentialDecay_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.ExponentialDecay(System.Single,System.Single,System.Single)">ExponentialDecay(Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates exponential decay for a value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float ExponentialDecay(float value, float alpha, float decay)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to decay.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>A factor by which to scale the decay.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">decay</span></td>
|
|
<td><p>The decay amount.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The exponentially decayed value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_GammaToLinear_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.GammaToLinear(System.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L70">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_GammaToLinear_" data-uid="X10D.Math.MathUtility.GammaToLinear*"></a>
|
|
<h4 id="X10D_Math_MathUtility_GammaToLinear_System_Double_" data-uid="X10D.Math.MathUtility.GammaToLinear(System.Double)">GammaToLinear(Double)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a gamma-encoded value to a linear value using a gamma value of <code>2.2</code>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double GammaToLinear(double value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The gamma-encoded value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The linear value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_GammaToLinear_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.GammaToLinear(System.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L83">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_GammaToLinear_" data-uid="X10D.Math.MathUtility.GammaToLinear*"></a>
|
|
<h4 id="X10D_Math_MathUtility_GammaToLinear_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.GammaToLinear(System.Double,System.Double)">GammaToLinear(Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a gamma-encoded value to a linear value using the specified gamma value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double GammaToLinear(double value, double gamma)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The gamma-encoded value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">gamma</span></td>
|
|
<td><p>The gamma value to use for decoding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The linear value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_GammaToLinear_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.GammaToLinear(System.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L45">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_GammaToLinear_" data-uid="X10D.Math.MathUtility.GammaToLinear*"></a>
|
|
<h4 id="X10D_Math_MathUtility_GammaToLinear_System_Single_" data-uid="X10D.Math.MathUtility.GammaToLinear(System.Single)">GammaToLinear(Single)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a gamma-encoded value to a linear value using a gamma value of <code>2.2</code>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float GammaToLinear(float value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The gamma-encoded value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The linear value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_GammaToLinear_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.GammaToLinear(System.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L58">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_GammaToLinear_" data-uid="X10D.Math.MathUtility.GammaToLinear*"></a>
|
|
<h4 id="X10D_Math_MathUtility_GammaToLinear_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.GammaToLinear(System.Single,System.Single)">GammaToLinear(Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a gamma-encoded value to a linear value using the specified gamma value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float GammaToLinear(float value, float gamma)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The gamma-encoded value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">gamma</span></td>
|
|
<td><p>The gamma value to use for decoding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The linear value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_InverseLerp_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.InverseLerp(System.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L118">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_InverseLerp_" data-uid="X10D.Math.MathUtility.InverseLerp*"></a>
|
|
<h4 id="X10D_Math_MathUtility_InverseLerp_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.InverseLerp(System.Double,System.Double,System.Double)">InverseLerp(Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the linear interpolation inverse of a value, such that it determines where a value lies between two other
|
|
values.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double InverseLerp(double alpha, double start, double end)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The value whose lerp inverse is to be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">start</span></td>
|
|
<td><p>The start of the range.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">end</span></td>
|
|
<td><p>The end of the range.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>A value determined by <code>(alpha - start) / (end - start)</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_InverseLerp_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.InverseLerp(System.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L98">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_InverseLerp_" data-uid="X10D.Math.MathUtility.InverseLerp*"></a>
|
|
<h4 id="X10D_Math_MathUtility_InverseLerp_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.InverseLerp(System.Single,System.Single,System.Single)">InverseLerp(Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the linear interpolation inverse of a value, such that it determines where a value lies between two other
|
|
values.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float InverseLerp(float alpha, float start, float end)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The value whose lerp inverse is to be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">start</span></td>
|
|
<td><p>The start of the range.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">end</span></td>
|
|
<td><p>The end of the range.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>A value determined by <code>(alpha - start) / (end - start)</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Lerp_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Lerp(System.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L186">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Lerp_" data-uid="X10D.Math.MathUtility.Lerp*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Lerp_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.Lerp(System.Double,System.Double,System.Double)">Lerp(Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Linearly interpolates from one value to a target using a specified alpha.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double Lerp(double value, double target, double alpha)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The interpolation source.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">target</span></td>
|
|
<td><p>The interpolation target.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The interpolation alpha.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The interpolation result as determined by <code>(1 - alpha) * value + alpha * target</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Lerp_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Lerp(System.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L168">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Lerp_" data-uid="X10D.Math.MathUtility.Lerp*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Lerp_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.Lerp(System.Single,System.Single,System.Single)">Lerp(Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Linearly interpolates from one value to a target using a specified alpha.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float Lerp(float value, float target, float alpha)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The interpolation source.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">target</span></td>
|
|
<td><p>The interpolation target.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The interpolation alpha.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The interpolation result as determined by <code>(1 - alpha) * value + alpha * target</code>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_LinearToGamma_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.LinearToGamma(System.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L312">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_LinearToGamma_" data-uid="X10D.Math.MathUtility.LinearToGamma*"></a>
|
|
<h4 id="X10D_Math_MathUtility_LinearToGamma_System_Double_" data-uid="X10D.Math.MathUtility.LinearToGamma(System.Double)">LinearToGamma(Double)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a linear value to a gamma-encoded value using a gamma value of <code>2.2</code>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double LinearToGamma(double value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The linear value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The gamma-encoded value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_LinearToGamma_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.LinearToGamma(System.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L325">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_LinearToGamma_" data-uid="X10D.Math.MathUtility.LinearToGamma*"></a>
|
|
<h4 id="X10D_Math_MathUtility_LinearToGamma_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.LinearToGamma(System.Double,System.Double)">LinearToGamma(Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a linear value to a gamma-encoded value using the specified gamma value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double LinearToGamma(double value, double gamma)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The linear value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">gamma</span></td>
|
|
<td><p>The gamma value to use for encoding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The gamma-encoded value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_LinearToGamma_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.LinearToGamma(System.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L287">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_LinearToGamma_" data-uid="X10D.Math.MathUtility.LinearToGamma*"></a>
|
|
<h4 id="X10D_Math_MathUtility_LinearToGamma_System_Single_" data-uid="X10D.Math.MathUtility.LinearToGamma(System.Single)">LinearToGamma(Single)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a linear value to a gamma-encoded value using a gamma value of <code>2.2</code>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float LinearToGamma(float value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The linear value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The gamma-encoded value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_LinearToGamma_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.LinearToGamma(System.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L300">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_LinearToGamma_" data-uid="X10D.Math.MathUtility.LinearToGamma*"></a>
|
|
<h4 id="X10D_Math_MathUtility_LinearToGamma_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.LinearToGamma(System.Single,System.Single)">LinearToGamma(Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a linear value to a gamma-encoded value using the specified gamma value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float LinearToGamma(float value, float gamma)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The linear value to convert. Expected range is [0, 1].</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">gamma</span></td>
|
|
<td><p>The gamma value to use for encoding.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The gamma-encoded value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Pulse_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Pulse(System.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L358">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Pulse_" data-uid="X10D.Math.MathUtility.Pulse*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Pulse_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.Pulse(System.Double,System.Double,System.Double)">Pulse(Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the pulse wave for a given value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double Pulse(double value, double lowerBound, double upperBound)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to calculate.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">lowerBound</span></td>
|
|
<td><p>The inclusive lower bound of the pulse.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">upperBound</span></td>
|
|
<td><p>The inclusive upper bound of the pulse.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>1 if <code data-dev-comment-type="paramref" class="paramref">value</code> lies between <code data-dev-comment-type="paramref" class="paramref">lowerBound</code> and <code data-dev-comment-type="paramref" class="paramref">upperBound</code>;
|
|
otherwise, 0.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Pulse_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Pulse(System.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L342">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Pulse_" data-uid="X10D.Math.MathUtility.Pulse*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Pulse_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.Pulse(System.Single,System.Single,System.Single)">Pulse(Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the pulse wave for a given value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float Pulse(float value, float lowerBound, float upperBound)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to calculate.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">lowerBound</span></td>
|
|
<td><p>The inclusive lower bound of the pulse.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">upperBound</span></td>
|
|
<td><p>The inclusive upper bound of the pulse.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>1 if <code data-dev-comment-type="paramref" class="paramref">value</code> lies between <code data-dev-comment-type="paramref" class="paramref">lowerBound</code> and <code data-dev-comment-type="paramref" class="paramref">upperBound</code>;
|
|
otherwise, 0.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Sawtooth_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Sawtooth(System.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L276">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Sawtooth_" data-uid="X10D.Math.MathUtility.Sawtooth*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Sawtooth_System_Double_" data-uid="X10D.Math.MathUtility.Sawtooth(System.Double)">Sawtooth(Double)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the incremental sawtooth wave of a given value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double Sawtooth(double value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to calculate.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The sawtooth wave of the given value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Sawtooth_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Sawtooth(System.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L266">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Sawtooth_" data-uid="X10D.Math.MathUtility.Sawtooth*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Sawtooth_System_Single_" data-uid="X10D.Math.MathUtility.Sawtooth(System.Single)">Sawtooth(Single)</h4>
|
|
<div class="markdown level1 summary"><p>Returns the incremental sawtooth wave of a given value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float Sawtooth(float value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to calculate.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The sawtooth wave of the given value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_ScaleRange_System_Double_System_Double_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.ScaleRange(System.Double%2CSystem.Double%2CSystem.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L251">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_ScaleRange_" data-uid="X10D.Math.MathUtility.ScaleRange*"></a>
|
|
<h4 id="X10D_Math_MathUtility_ScaleRange_System_Double_System_Double_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.ScaleRange(System.Double,System.Double,System.Double,System.Double,System.Double)">ScaleRange(Double, Double, Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a value from being a percentage of one range, to being the same percentage in a new range.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double ScaleRange(double value, double oldMin, double oldMax, double newMin, double newMax)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to convert.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">oldMin</span></td>
|
|
<td><p>The old minimum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">oldMax</span></td>
|
|
<td><p>The old maximum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">newMin</span></td>
|
|
<td><p>The new minimum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">newMax</span></td>
|
|
<td><p>The new maximum value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The scaled value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_ScaleRange_System_Single_System_Single_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.ScaleRange(System.Single%2CSystem.Single%2CSystem.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L232">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_ScaleRange_" data-uid="X10D.Math.MathUtility.ScaleRange*"></a>
|
|
<h4 id="X10D_Math_MathUtility_ScaleRange_System_Single_System_Single_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.ScaleRange(System.Single,System.Single,System.Single,System.Single,System.Single)">ScaleRange(Single, Single, Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Converts a value from being a percentage of one range, to being the same percentage in a new range.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float ScaleRange(float value, float oldMin, float oldMax, float newMin, float newMax)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The value to convert.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">oldMin</span></td>
|
|
<td><p>The old minimum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">oldMax</span></td>
|
|
<td><p>The old maximum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">newMin</span></td>
|
|
<td><p>The new minimum value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">newMax</span></td>
|
|
<td><p>The new maximum value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The scaled value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Sigmoid_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Sigmoid(System.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L387">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Sigmoid_" data-uid="X10D.Math.MathUtility.Sigmoid*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Sigmoid_System_Double_" data-uid="X10D.Math.MathUtility.Sigmoid(System.Double)">Sigmoid(Double)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the sigmoid function for the given input value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double Sigmoid(double value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The input value for which to calculate the sigmoid function.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The result of applying the sigmoid function to the input value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_MathUtility_Sigmoid_System_Double__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>The sigmoid function is a commonly used activation function in artificial neural networks and logistic regression. It
|
|
maps any real-valued number to a value between 0 and 1.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_Sigmoid_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.Sigmoid(System.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L373">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_Sigmoid_" data-uid="X10D.Math.MathUtility.Sigmoid*"></a>
|
|
<h4 id="X10D_Math_MathUtility_Sigmoid_System_Single_" data-uid="X10D.Math.MathUtility.Sigmoid(System.Single)">Sigmoid(Single)</h4>
|
|
<div class="markdown level1 summary"><p>Calculates the sigmoid function for the given input value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float Sigmoid(float value)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The input value for which to calculate the sigmoid function.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The result of applying the sigmoid function to the input value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 id="X10D_Math_MathUtility_Sigmoid_System_Single__remarks">Remarks</h5>
|
|
<div class="markdown level1 remarks"><p>The sigmoid function is a commonly used activation function in artificial neural networks and logistic regression. It
|
|
maps any real-valued number to a value between 0 and 1.</p>
|
|
</div>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_SmoothStep_System_Double_System_Double_System_Double_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.SmoothStep(System.Double%2CSystem.Double%2CSystem.Double)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L216">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_SmoothStep_" data-uid="X10D.Math.MathUtility.SmoothStep*"></a>
|
|
<h4 id="X10D_Math_MathUtility_SmoothStep_System_Double_System_Double_System_Double_" data-uid="X10D.Math.MathUtility.SmoothStep(System.Double,System.Double,System.Double)">SmoothStep(Double, Double, Double)</h4>
|
|
<div class="markdown level1 summary"><p>Performs smooth Hermite interpolation from one value to a target using a specified alpha.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static double SmoothStep(double value, double target, double alpha)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The interpolation source.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">target</span></td>
|
|
<td><p>The interpolation target.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The interpolation alpha.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Double</span></td>
|
|
<td><p>The interpolation result.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<span class="small pull-right mobile-hide">
|
|
<span class="divider">|</span>
|
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Math_MathUtility_SmoothStep_System_Single_System_Single_System_Single_.md&value=---%0Auid%3A%20X10D.Math.MathUtility.SmoothStep(System.Single%2CSystem.Single%2CSystem.Single)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|
</span>
|
|
<span class="small pull-right mobile-hide">
|
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Math/MathUtility.cs/#L202">View Source</a>
|
|
</span>
|
|
<a id="X10D_Math_MathUtility_SmoothStep_" data-uid="X10D.Math.MathUtility.SmoothStep*"></a>
|
|
<h4 id="X10D_Math_MathUtility_SmoothStep_System_Single_System_Single_System_Single_" data-uid="X10D.Math.MathUtility.SmoothStep(System.Single,System.Single,System.Single)">SmoothStep(Single, Single, Single)</h4>
|
|
<div class="markdown level1 summary"><p>Performs smooth Hermite interpolation from one value to a target using a specified alpha.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="decalaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static float SmoothStep(float value, float target, float alpha)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">value</span></td>
|
|
<td><p>The interpolation source.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">target</span></td>
|
|
<td><p>The interpolation target.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><span class="parametername">alpha</span></td>
|
|
<td><p>The interpolation alpha.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="returns">Returns</h5>
|
|
<table class="table table-bordered table-striped table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="xref">System.Single</span></td>
|
|
<td><p>The interpolation result.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</article>
|
|
</div>
|
|
|
|
<div class="copyright-footer">
|
|
<span>© Singulink. All rights reserved.</span>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script>
|
|
<script type="text/javascript" src="../styles/jquery.twbsPagination.js"></script>
|
|
<script type="text/javascript" src="../styles/url.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
|
|
<script type="text/javascript" src="../styles/docfx.js"></script>
|
|
<script type="text/javascript" src="../styles/singulink.js"></script>
|
|
<script type="text/javascript" src="../styles/main.js"></script> </body>
|
|
</html>
|