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

Meter Consumption

Compute consumption between two readings on a wrapping meter, assuming at most one wrap. Modulus is one beyond the largest reading.

Source repository · Package JSON

Use Meter Consumption

use vendor::meter_consumption::meter_consumption;

Run the example

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

fn main() {
    println!(meter_consumption(98,3,100));
}

Expected output

5

Published versions

VersionPackageSource commitSHA-256
0.1.1Download ZIP · Browse filese66958082905ad26846e2238d961a57a442b50e99b5f7f8312d394165b3133c0da8d7757c4
0.1.0Download ZIP · Browse files6349f237848fe210cbad22d0562b3439d4e5045a65e1a7ffa8b0cebf4f2bddcd2edf5215b1