mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 20:17:42 +03:00
Account for floating point results in to_relative_box
Because the function uses division the return types may either be int or float.
This commit is contained in:
parent
c2337894bd
commit
f60e8ee76e
@ -169,7 +169,7 @@ def get_tz_modifiers(tz_name: str) -> Tuple[str, str, float]:
|
||||
|
||||
def to_relative_box(
|
||||
width: int, height: int, box: Tuple[int, int, int, int]
|
||||
) -> Tuple[int, int, int, int]:
|
||||
) -> Tuple[int | float, int | float, int | float, int | float]:
|
||||
return (
|
||||
box[0] / width, # x
|
||||
box[1] / height, # y
|
||||
|
||||
Loading…
Reference in New Issue
Block a user