Registry / Library

library · v0.1.0
LineFit
Compute the usable print area and whole lines per page.
Use LineFit
use vendor::linefit::linefit;
Run the example
nest demo linefit@0.1.0
blyxc native-run linefit-demo/main.blyx
Example source and expected output
use vendor::linefit::linefit;
fn main() {
let paper = 100.0;
let top = 10.0;
let bottom = 15.0;
let line = 6.0;
let result = linefit_capacity(paper, top, bottom, line);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
75
12
3
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | afa8b9907f | 26c63543214dd4907c0d32043f5030c9daeb24a6465001c550adb91ad7974733 |