console.log(Math.fround(1.4));// 1.399999976158142
console.log(Math.fround(1.5));// 1.5
console.log(Math.fround(NaN));// NaN
console.log(Math.fround(Infinity));// Infinity
console.log(Math.fround(0));// 0
Math.hypot():返回所有参数平方和的平方根。
非数值则先转为数值;
只要有一个参数无法转为数值,则返回NaN;
console.log(Math.hypot(0,5,3));//5.8309518948453
console.log(Math.hypot(0,'5'));// 5
console.log(Math.hypot(0,5,'a'));// NaN
console.log(Math.hypot(0,5,NaN));// NaN