JavaScript 中的 Math.imul() 函数
htmljavascriptweb developmentfront end technology更新于 2024/8/11 20:22:00
Math 对象的 imul() 函数接受两个数字并返回给定数字的类似 C 的 32 位乘法结果。
语法
其语法如下
Math.imul(47, 56);
示例
<html> <head> <title>JavaScript 示例</title> </head> <body> <script type="text/javascript"> var result = Math.imul(47, 56); document.write("Result: "+result); </script> </body> </html>
输出
Result: 2632