lol using scaled looks worse
This commit is contained in:
parent
70573bf3a0
commit
d8fad6ad0a
1 changed files with 3 additions and 1 deletions
|
@ -56,12 +56,14 @@ fn main() {
|
|||
let (x, y) = pos_to_sample(ix, iy);
|
||||
let i = expr.eval(x, y);
|
||||
let scaled = i / (max - min);
|
||||
let channel = (i * 256.0) as u8;
|
||||
let channel = (scaled * 256.0) as u8;
|
||||
put_pixel(channel, channel, channel);
|
||||
put_pixel(channel, channel, channel);
|
||||
}
|
||||
println!();
|
||||
}
|
||||
// reset style
|
||||
print!("\x1b[0m")
|
||||
}
|
||||
|
||||
fn put_pixel(r: u8, g: u8, b: u8) {
|
||||
|
|
Loading…
Reference in a new issue