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

ClockFold

Classify a local time around one supplied offset transition.

Source repository · Package JSON

Use ClockFold

use vendor::clockfold::clockfold;

Run the example

nest demo clockfold@0.1.0
blyxc native-run clockfold-demo/main.blyx
Example source and expected output
use vendor::clockfold::clockfold;

fn main() {
    let local = 11000.0;
    let transition = 10000.0;
    let before = 3600.0;
    let after = 0.0;
    let result = clockfold_classify(local, transition, before, after);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

2
7400
11000

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIPdc677cc5a74881ce1fe1a2c24350a93fb3fd8e450014c63daa3c1b8f19de2322695f143c6a