mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 04:27: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(
|
def to_relative_box(
|
||||||
width: int, height: int, box: Tuple[int, int, int, int]
|
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 (
|
return (
|
||||||
box[0] / width, # x
|
box[0] / width, # x
|
||||||
box[1] / height, # y
|
box[1] / height, # y
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user