博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
汇编中imul_JavaScript中带有示例的Math.imul()方法
阅读量:2532 次
发布时间:2019-05-11

本文共 1223 字,大约阅读时间需要 4 分钟。

汇编中imul

JavaScript | Math.imul()方法 (JavaScript | Math.imul() Method)

Math.imul() is a function in math library of JavaScript that is used to the 32-bit multiplication of the two values passed to it. It uses C-like semantics to find the multiplication. It can accept floating-point variables but will convert it into integer before conversion.

Math.imul()是JavaScript数学库中的函数,用于对传递给它的两个值进行32位乘法。 它使用类似于C的语义来查找乘法。 它可以接受浮点变量,但会在转换前将其转换为整数。

Syntax:

句法:

Math.imul(val1, val2);

Parameter(s):

参数:

  • val1, val2 – represent the values that are to be multiplied using 32-bit multiplication.

    val1,val2 –表示要使用32位乘法相乘的值。

Return value:

返回值:

The return type of this method is number, it returns the 32-bit multiplication.

该方法的返回类型为number ,它返回32位乘法。

Browser support: Chrome, Internet explorer, Mozilla, Safari, Opera mini.

浏览器支持: Chrome,Internet Explorer,Mozilla,Safari,Opera mini。

Example 1: Valid values

示例1:有效值

console.log(Math.imul(8, 5));console.log(Math.imul(6.4, 2.1));console.log(Math.imul(-32, 32));console.log(Math.imul(0, 23));console.log(Math.imul("27.08", "-3"));

Output

输出量

4012-10240-81

Example 2: With strings

示例2:带字符串

console.log(Math.imul("Javascript"));console.log(Math.imul("Javascript", "C++"));

Output

输出量

00

翻译自:

汇编中imul

转载地址:http://bsxzd.baihongyu.com/

你可能感兴趣的文章
js补充知识点-label应用
查看>>
给构造函数(constructor)创建对象(object)
查看>>
局域网访问PHP项目网站 用IP地址进入
查看>>
VM虚拟机,Linux系统安装tools过程遇到 what is the location of the “ifconfig” program
查看>>
Jquery实现循环删除Reaper某一行
查看>>
脚本升级openssh
查看>>
linux学习(3)——vim文本编辑工具
查看>>
快速开发平台如何应用
查看>>
hadoop的理解
查看>>
Java测试当前应用所占用的内存示例
查看>>
网站限制IP访问应该怎么办
查看>>
121. Best Time to Buy and Sell Stock
查看>>
hdu 1005 根据递推公式构造矩阵 ( 矩阵快速幂)
查看>>
安装php扩展
查看>>
mysql统计某一个数据库中有几张表
查看>>
百度移动搜索主要有如下几类结果构成
查看>>
梦断代码最后4章读后感
查看>>
python学习---字符串
查看>>
Python爬虫面试题170道:2019版【1】
查看>>
JavaBean规范
查看>>