小编use*_*812的帖子

如何将浮点数舍入到最接近的最大int数?

例如,我有1.242533222,我想将它舍入为2.换句话说,我想将一个浮点数舍入到最接近的最大整数.如何在Python 3中做到这一点?

python rounding python-3.x

-3
推荐指数
1
解决办法
2571
查看次数

标签 统计

python ×1

python-3.x ×1

rounding ×1