diff options
| author | Irvin <irvinfly@gmail.com> | 2022-02-16 02:07:31 +0800 |
|---|---|---|
| committer | Irvin <irvinfly@gmail.com> | 2022-02-16 02:35:54 +0800 |
| commit | d9e9adb5f80a819fe46349bcf6d1faec734b09cd (patch) | |
| tree | e856dc5e31aad0a7d5e8c2f98c9ee139d9569a86 /files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html | |
| parent | 7c2556fe79c44d7c31108b8c8b048d2b7704a95e (diff) | |
| download | translated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.tar.gz translated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.tar.bz2 translated-content-d9e9adb5f80a819fe46349bcf6d1faec734b09cd.zip | |
remove span tag in zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html')
| -rw-r--r-- | files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html b/files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html index 67da70040d..9d0e9f1c29 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/math/imul/index.html @@ -45,7 +45,7 @@ Math.imul(0xfffffffe, 5) //-10 <p>下面的 JavaScript 代码可以实现该函数:</p> -<pre class="brush: js"><span style='background-color: transparent; font-family: consolas,"Liberation Mono",courier,monospace; font-size: 1rem; font-weight: inherit; letter-spacing: -0.00278rem; white-space: pre;'>if (!Math.imul) Math.imul = function(a, b) {</span> +<pre class="brush: js">if (!Math.imul) Math.imul = function(a, b) { var aHi = (a >>> 16) & 0xffff; var aLo = a & 0xffff; var bHi = (b >>> 16) & 0xffff; @@ -57,7 +57,7 @@ Math.imul(0xfffffffe, 5) //-10 <p>然而,下面的实现性能会更好一些。因为运行这段 polyfill 的浏览器很有可能会在内部使用浮点数,而不是整数表示 javascript 的 Number。</p> -<pre class="brush: js"><span style='background-color: transparent; font-family: consolas,"Liberation Mono",courier,monospace; font-size: 1rem; font-weight: inherit; letter-spacing: -0.00278rem; white-space: pre;'>if (!Math.imul) Math.imul = function(opA, opB) {</span> +<pre class="brush: js">if (!Math.imul) Math.imul = function(opA, opB) { opB |= 0; // ensure that opB is an integer. opA will automatically be coerced. // floating points give us 53 bits of precision to work with plus 1 sign bit // automatically handled for our convienence: |
