miscs (Interro02) : horizontal cutting resolution

This commit is contained in:
2026-09-14 22:20:46 +02:00
parent 5080274e8f
commit 0a86403ca6
28 changed files with 1447 additions and 59 deletions
+13
View File
@@ -0,0 +1,13 @@
"""Geometry checks shared by correction and annotation rendering."""
import math
from numbers import Real
def valid_feedback_box(box) -> bool:
return (
isinstance(box, (list, tuple)) and len(box) == 4
and all(isinstance(value, Real) and not isinstance(value, bool)
and math.isfinite(value) for value in box)
and box[0] < box[2] and box[1] < box[3]
)