Skip to content

Commit

Permalink
Modified util_make_irect() to capture area more robustly; updates issue
Browse files Browse the repository at this point in the history
  • Loading branch information
psambit9791 committed Feb 16, 2024
1 parent 1daf2c4 commit 507ad73
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20306,13 +20306,15 @@ def handle_args():

def util_make_irect( *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None):
a, b, c, d = util_make_rect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1)
def convert(x):
ret = int(x)
return ret
a = convert(a)
b = convert(b)
c = convert(c)
d = convert(d)
def convert(x, ceil):
if ceil:
return int(math.ceil(x))
else:
return int(math.floor(x))
a = convert(a, False)
b = convert(b, False)
c = convert(c, True)
d = convert(d, True)
return a, b, c, d


Expand Down

0 comments on commit 507ad73

Please sign in to comment.