mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-12-15 23:37:25 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<h2 id="Summary" name="Summary">概述</h2>
|
||||
<p><code><strong>Math.expm1()</strong></code> 函数返回 <code>E<sup>x</sup> - 1</code>, 其中 <code>x</code> 是该函数的参数, <code>E</code> 是自然对数的底数 <code>2.718281828459045.</code></p>
|
||||
<h2 id="Syntax" name="Syntax">语法</h2>
|
||||
<pre class="syntaxbox"><code>Math.expm1(<em>x</em>)</code></pre>
|
||||
<pre><code class="language-javascript"><code>Math.expm1(<em>x</em>)</code></code></pre>
|
||||
<h3 id="Parameters" name="Parameters">参数</h3>
|
||||
<dl>
|
||||
<dt><code>x</code></dt>
|
||||
@@ -13,17 +13,17 @@
|
||||
<p><code><span style="color: #4d4e53; font-family: 'Open Sans',sans-serif; line-height: 21px;">参数 </span><code style="font-size: 14px; line-height: inherit; margin: 0px; padding: 0px; border: 0px; color: rgb(77, 78, 83);">x</code><span style="color: #4d4e53; font-family: 'Open Sans',sans-serif; line-height: 21px;"> 会被自动类型转换成 </span><code style="font-size: 14px; line-height: inherit; margin: 0px; padding: 0px; border: 0px; color: rgb(77, 78, 83);">number </code><span style="color: #4d4e53; font-family: 'Open Sans',sans-serif; line-height: 21px;">类型.</span></code></p>
|
||||
<p><code>expm1 是 "exponent minus 1" 的缩写.</code></p>
|
||||
<h2 id="Examples" name="Examples">示例</h2>
|
||||
<pre class="brush:js">Math.expm1(1) // 1.7182818284590453
|
||||
<pre><code class="language-js">Math.expm1(1) // 1.7182818284590453
|
||||
Math.expm1(-38) // -1
|
||||
Math.expm1("-38") // -1
|
||||
Math.expm1("foo") // NaN
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="Polyfill">Polyfill</h2>
|
||||
<p>因为我们已经有了 <code>Math.exp </code>函数, 所以很容易 polyfill.</p>
|
||||
<pre class="brush: js">Math.expm1 = Math.expm1 || function (x) {
|
||||
<pre><code class="language-javascript">Math.expm1 = Math.expm1 || function (x) {
|
||||
return Math.exp(x) - 1
|
||||
}
|
||||
</pre>
|
||||
</code></pre>
|
||||
<h2 id="规范">规范</h2>
|
||||
<table class="standard-table">
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user