mirror of
https://github.com/283375/arcaea-offline-ocr.git
synced 2025-07-01 04:16:27 +00:00
feat: XYWHRect __mul__
This commit is contained in:
@ -34,3 +34,9 @@ class XYWHRect(NamedTuple):
|
||||
raise TypeError()
|
||||
|
||||
return self.__class__(*[a - b for a, b in zip(self, other)])
|
||||
|
||||
def __mul__(self, other):
|
||||
if not isinstance(other, (int, float)):
|
||||
raise TypeError()
|
||||
|
||||
return self.__class__(*[v * other for v in self])
|
||||
|
Reference in New Issue
Block a user