Skip to content

Commit

Permalink
fix wrong inversion in y axis during transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
LGFae committed May 14, 2024
1 parent bd86710 commit 90e9553
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/src/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ impl Position {
let y = match self.y {
Coord::Pixel(y) => {
if invert_y {
dim.1 as f32 - y
} else {
y
} else {
dim.1 as f32 - y
}
}
Coord::Percent(y) => {
if invert_y {
(1.0 - y) * dim.1 as f32
} else {
y * dim.1 as f32
} else {
(1.0 - y) * dim.1 as f32
}
}
};
Expand Down

0 comments on commit 90e9553

Please sign in to comment.