def matrix.norm
import gralha-svg-render@0.1.0.1/svg.bend as Svgimport Base
import gralha-text-scan@0.1.0.1/scan.bend as U
153# The largest scale the matrix applies to any direction, bounded by its
154# Frobenius norm; local tolerance = pixel tolerance / scale.
155def matrix.norm(+m: Matrix) -> F32:
156 Matrix{a, b, c, d, e, f} = m
157 U.max(0.000001, F32.sqrt((a * a + b * b + c * c + d * d : F32)))