Registry / Library

library · v0.1.0
ChunkSpan
Locate a fixed-width chunk including the final partial chunk.
Use ChunkSpan
use vendor::chunkspan::chunkspan;
Run the example
nest demo chunkspan@0.1.0
blyxc native-run chunkspan-demo/main.blyx
Example source and expected output
use vendor::chunkspan::chunkspan;
fn main() {
let size = 10.0;
let width = 4.0;
let index = 2.0;
let result = chunkspan_bounds(size, width, index);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
8
10
3
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 5be66afce5 | ddc887c6c97f18e406d8ed2ecb8e5e1f7f9703a0b951e2913aaaccfbb6bdc36d |