Skip to content

Commit 3415523

Browse files
committed
✨ use ceil instead of floor for vols
1 parent 8fa866c commit 3415523

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/volume_pane.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ impl VolumePane {
4545
let volume = candle.volume.unwrap_or_default();
4646

4747
let volume_percent_of_max = volume / max_volume;
48-
let b = volume_percent_of_max * self.height as f64;
48+
let ratio = volume_percent_of_max * self.height as f64;
4949

50-
if y < b.floor() as i64 {
50+
if y < ratio.ceil() as i64 {
5151
return self.colorize(&candle.get_type(), &self.unicode_fill.to_string());
5252
}
5353

0 commit comments

Comments
 (0)