Registry / Library

library · v0.1.0
LotRound
Round a shortage to a supplier's whole purchase lots.
Use LotRound
use vendor::lotround::lotround;
Run the example
nest demo lotround@0.1.0
blyxc native-run lotround-demo/main.blyx
Example source and expected output
use vendor::lotround::lotround;
fn main() {
let need = 7.0;
let lot = 4.0;
let result = lotround_order(need, lot);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
2
8
1
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 3f7d79b085 | 08c5061a0148a6c497ee2a4b713e6c5f05252be042d12acc77f56295a6369faa |