MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / gradient

Function gradient

fl16-inputmodules/src/patterns.rs:257–266  ·  view source on GitHub ↗

Gradient getting brighter from top to bottom

()

Source from the content-addressed store, hash-verified

255
256/// Gradient getting brighter from top to bottom
257pub fn gradient() -> Grid {
258 let gradient_drop = 1; // Brightness drop between rows
259 let mut grid = Grid::default();
260 for y in 0..HEIGHT {
261 for x in 0..WIDTH {
262 grid.0[x][y] = (gradient_drop * (y + 1)) as u8;
263 }
264 }
265 grid
266}
267
268/// Fill a percentage of the rows from the bottom up
269pub fn percentage(percentage: u16) -> Grid {

Callers 1

handle_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected