def midpoint(w: dict) -> float: return (w["x0"] + w["x1"]) / 2.0