Es6-math-function-hypot
提供:Dev Guides
ES6-Math.hypot(x1、x2、…)関数
引数の合計の平方根を返します。
構文
パラメータ
- X1およびx2 .. −は数字を表します
戻り値
引数を渡されたすべての数値の合計の平方根を返します
引数の合計の平方根を返します。
Math.hypot( x1,x2.. ) ;
引数を渡されたすべての数値の合計の平方根を返します
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))
---Math.hypot()---
Math.hypot(3,4) : 5
Math.hypot(2,3,4) : 5.385164807134504