文件名称:rounded-div:获取整数除法的舍入结果
文件大小:25KB
文件格式:ZIP
更新时间:2024-05-07 09:51:46
rust library binary crates integer
四舍五入 获取整数除法的舍入结果。 使用范例 const fn rounded_div_* assert_eq! (rounded_div :: i32 ( 59 , 4 ), 15 ); // 59/4 is equal to 14.75 which is closer to 15 assert_eq! (rounded_div :: i32 ( 58 , 4 ), 15 ); // 59/4 is equal to 14.5 which is rounded to 15 assert_eq! (rounded_div :: i32 ( 57 , 4 ), 14 ); // 59/4 is equal to 14.25 which is closer to 14 assert_eq! (rounded_div :: i32 ( - 59 , 4 ), - 15 ); asser
【文件预览】:
rounded-div-master
----.gitignore(37B)
----src()
--------program.rs(176B)
--------program()
--------lib.rs(2KB)
----LICENSE.md(1KB)
----cli()
--------rounded-div.rs(53B)
--------rounded-div-completions.rs(60B)
----Cargo.lock(7KB)
----fmt.sh(236B)
----generate-completions.sh(287B)
----Cargo.toml(965B)
----exports()
--------completion.elv(5KB)
--------completion.zsh(7KB)
--------completion.fish(4KB)
--------completion.ps1(10KB)
--------completion.bash(8KB)
----clippy.sh(160B)
----.github()
--------FUNDING.yml(622B)
--------workflows()
--------dependabot.yml(384B)
----README.md(1KB)
----run.sh(104B)
----tests()
--------cli.rs(3KB)
--------function.rs(2KB)
--------trait.rs(2KB)
--------completions.rs(937B)
----ci()
--------github-actions()
----.gitattributes(41B)
----rust-toolchain(7B)
----renovate.json(172B)
----template()
--------build-fs-tree()
--------build-fs-tree-bin()
----.editorconfig(203B)