MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / build_positions

Function build_positions

examples/bad_apple.rs:134–143  ·  view source on GitHub ↗
(width: usize, height: usize)

Source from the content-addressed store, hash-verified

132}
133
134fn build_positions(width: usize, height: usize) -> Vec<[f64; 2]> {
135 let mut positions = Vec::with_capacity(width * height);
136 for y in 0..height {
137 for x in 0..width {
138 let py = (height - 1 - y) as f64;
139 positions.push([x as f64, py]);
140 }
141 }
142 positions
143}
144
145fn frame_colors(frame_idx: usize, frames: &[u8], width: usize, height: usize) -> Vec<Color> {
146 let pixels_per_frame = width * height;

Callers 1

newMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected