目录

Math.hypot(x1, x2,...)

返回参数总和的平方根。

语法 (Syntax)

Math.hypot( x1,x2.. ) ;   

参数 (Parameter)

  • X1和x2 .. - 表示数字

返回值 (Return Value)

返回通过参数传递的所有数字之和的平方根

例子 (Example)

console.log("---Math.hypot()---") 
console.log("Math.hypot(3,4) : "+Math.hypot(3,4)) 
console.log("Math.hypot(2,3,4) : "+Math.hypot(2,3,4))        

输出 (Output)

---Math.hypot()--- 
Math.hypot(3,4) : 5 
Math.hypot(2,3,4) : 5.385164807134504           
↑回到顶部↑
WIKI教程 @2018