app.util

Shared utility functions used across the app.

Contains general-purpose helpers that don’t belong to any specific domain namespace (e.g. SVG coordinate conversion, numeric clamping).

clamp

(clamp value min-v max-v)

Clamps value to the inclusive range min-v, max-v.

client->svg

(client->svg svg client-x client-y)

Convert client (screen) coordinates to SVG user-space coordinates. Returns svg-x svg-y or nil if the SVG’s CTM is unavailable.