Registry / Library

library · v0.1.0
BoxClip
Clip a detection rectangle to the visible image.
Use BoxClip
use vendor::boxclip::boxclip;
Run the example
nest demo boxclip@0.1.0
blyxc native-run boxclip-demo/main.blyx
Example source and expected output
use vendor::boxclip::boxclip;
fn main() {
let box = [-2, -1, 4, 6];
let width = 3.0;
let height = 4.0;
let result = boxclip_inside(box, width, height);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
0
0
3
4
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | a203befb1e | 2e05fcc112932c0dc699b91c652bd1453c95ea55439fea42a759c94fdfe8ae14 |