Blyx Nest Blyx language
Registry / Library
library · v0.1.0

BoxClip

Clip a detection rectangle to the visible image.

Source repository · Package JSON

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

VersionPackageSource commitSHA-256
0.1.0Download ZIPa203befb1e2e05fcc112932c0dc699b91c652bd1453c95ea55439fea42a759c94fdfe8ae14