def cover.reach

gralha-svg-render@0.1.0.1 · svg.bend:4400

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

4400# Half a device pixel in local units, so a scene whose box only reaches into part
4401# of a pixel is still painted there: the pixel center may lie outside the box.
4402def cover.reach(+inv: Matrix, +half: F32) -> F32:
4403  Matrix{a, b, c, d, e, f} = inv
4404  (half * U.max(F32.sqrt((a * a + b * b : F32)), F32.sqrt((c * c + d * d : F32))) + 0.0001 : F32)
4405
4406@unsafe

Uses (6)

Used by (1)