Skip to content

Commit

Permalink
Removing max() call
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaspadilha committed Jul 30, 2024
1 parent 0e0422e commit ba7cb3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vibe_lib/vibe_lib/spaceeye/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ def _adjust_roi_window(self, window: Window) -> Window:

dw_left = dw if ws[0] - dw >= 0 else ws[0]
dw_right = diff_w - dw_left
min_w = max(ws[0] - dw_left, 0)
min_w = ws[0] - dw_left
max_w = min(ws[1] + dw_right, self.raster_width)

dh_top = dh if hs[0] - dh >= 0 else hs[0]
dh_bottom = diff_h - dh_top
min_h = max(hs[0] - dh_top, 0)
min_h = hs[0] - dh_top
max_h = min(hs[1] + dh_bottom, self.raster_height)

new_win = Window.from_slices((min_h, max_h), (min_w, max_w))
Expand Down

0 comments on commit ba7cb3c

Please sign in to comment.