One - One Code All

Blog Content

rust数学运算向上取整向下取整

Rust   2017-04-28 10:18:44

Number

  • floor,浮点数向下取整

  • ceil, 浮点数向上取整

  • round,根据中间数向上或向下取值

  • trunc,返回浮点数的整数部分

  • fract, 返回浮点数的小数部分

  • abs,绝对值




上一篇:flask,SQLAlchemy的in和not in等查询方式总结
下一篇:别怕!带你了解支气管镜检查

The minute you think of giving up, think of the reason why you held on so long.