diff options
author | t7yang <t7yang@gmail.com> | 2022-01-10 08:38:05 +0800 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
commit | 6ca84f1794af830ada9736d7289ce29aabb04ca3 (patch) | |
tree | bb8000558a4eb75d7be1f3543d66bfc4c44bada9 /files/zh-tw/web/javascript/reference/global_objects/math | |
parent | 8d1313c84cc82d81363ed62b75baedb9a65ff2e3 (diff) | |
download | translated-content-6ca84f1794af830ada9736d7289ce29aabb04ca3.tar.gz translated-content-6ca84f1794af830ada9736d7289ce29aabb04ca3.tar.bz2 translated-content-6ca84f1794af830ada9736d7289ce29aabb04ca3.zip |
remove `notranslate` class in zh-TW
Diffstat (limited to 'files/zh-tw/web/javascript/reference/global_objects/math')
-rw-r--r-- | files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html | 4 | ||||
-rw-r--r-- | files/zh-tw/web/javascript/reference/global_objects/math/random/index.html | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html index 2bf7ffdc68..7119ba5862 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/pow/index.html @@ -11,7 +11,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow <h2 id="語法">語法</h2> -<pre class="syntaxbox notranslate"><code>Math.pow(<var>base</var>, <var>exponent</var>)</code></pre> +<pre class="syntaxbox"><code>Math.pow(<var>base</var>, <var>exponent</var>)</code></pre> <h3 id="參數">參數</h3> @@ -36,7 +36,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/pow <h3 id="使用_Math.pow">使用 <code>Math.pow()</code></h3> -<pre class="brush: js notranslate">// simple +<pre class="brush: js">// simple Math.pow(7, 2); // 49 Math.pow(7, 3); // 343 Math.pow(2, 10); // 1024 diff --git a/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html b/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html index 1613c18777..896d4ab948 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/math/random/index.html @@ -18,7 +18,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <h2 id="語法">語法</h2> -<pre class="syntaxbox notranslate">Math.random()</pre> +<pre class="syntaxbox">Math.random()</pre> <h3 id="回傳值_Return_value">回傳值 Return value</h3> @@ -30,7 +30,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <h3 id="Getting_a_random_number_between_0_inclusive_and_1_exclusive">Getting a random number between 0 (inclusive) and 1 (exclusive)</h3> -<pre class="brush: js notranslate">function getRandom() { +<pre class="brush: js">function getRandom() { return Math.random(); } </pre> @@ -39,7 +39,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <p>This example returns a random number between the specified values. The returned value is no lower than (and may possibly equal) <code>min</code>, and is less than (and not equal) <code>max</code>.</p> -<pre class="brush: js notranslate">function getRandomArbitrary(min, max) { +<pre class="brush: js">function getRandomArbitrary(min, max) { return Math.random() * (max - min) + min; } </pre> @@ -48,7 +48,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <p>This example returns a random <em>integer</em> between the specified values. The value is no lower than <code>min</code> (or the next integer greater than <code>min</code> if <code>min</code> isn't an integer), and is less than (but not equal to) <code>max</code>.</p> -<pre class="brush: js notranslate">function getRandomInt(min, max) { +<pre class="brush: js">function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive @@ -63,7 +63,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Math/random <p>While the <code>getRandomInt()</code> function above is inclusive at the minimum, it's exclusive at the maximum. What if you need the results to be inclusive at both the minimum and the maximum? The <code>getRandomIntInclusive()</code> function below accomplishes that.</p> -<pre class="brush: js notranslate">function getRandomIntInclusive(min, max) { +<pre class="brush: js">function getRandomIntInclusive(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive |