def tile.wrap

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

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

2320# Pattern tiles (see cover.brush): wrap into the tile and read its raster
2321# bilinearly, wrapping at the seams so neighbouring tiles join without a border.
2322def tile.wrap(+q: F32, +size: F32) -> F32:
2323  (q - F32.floor((q / size : F32)) * size : F32)

Uses (5)

Used by (3)