Registry / Library

library · v0.1.0
BoxOverlap
Measure intersection and union of two axis-aligned image boxes.
Use BoxOverlap
use vendor::boxoverlap::boxoverlap;
Run the example
nest demo boxoverlap@0.1.0
blyxc native-run boxoverlap-demo/main.blyx
Example source and expected output
use vendor::boxoverlap::boxoverlap;
fn main() {
let a = [0, 0, 4, 4];
let b = [0, 0, 2, 2];
let result = boxoverlap_measure(a, b);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
4
16
0.25
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 8f968a367a | 4c803905a3b7c28a49555db86b116e262cd04e3fd319a300e963bdc28a6a180e |