📌  相关文章
📜  react native 0.60.4 xiaomi 在打开时崩溃 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:28.278000             🧑  作者: Mango

代码示例1
function float2int (value) {
    return value | 0;
}

float2int(3.75); //3 - always just truncates decimals

//other options
Math.floor( 3.75 );//3 - goes to floor , note (-3.75 = -4)
Math.ceil( 3.75 ); //4 - goes to ceiling, note (-3.75 = -3)
Math.round( 3.75 );//4