def Short.near
import bend-kit-fmt@0.1.0.0/fmt.bend as Fmtimport Base
222# A tie rounds to the even digit.
223def Short.near(c: Cmp, +d: U32) -> U32:
224 match c:
225 case LT{}:
226 d
227 case GT{}:
228 U32.add(d, 1)
229 case EQ{}:
230 U32.add(d, U32.and(d, 1))