Skip to main content

Math.fround()

语法​

fround(x: number): number;

描述​

用于将64位的浮点数转换为32位浮点数。

示例​

Math.fround(1.5); // 1.5
Math.fround(1.337); // 1.3370000123977661