From 7555a8fda3d259b904cd93f13f606fe29b47528e Mon Sep 17 00:00:00 2001 From: hnoerenberg Date: Fri, 20 Nov 2026 01:03:16 +0100 Subject: [PATCH] docs(smartselect): note that RIM_HALO is ceil(3*sigma)+1 Comment only: spells out the rounding the integer cast relies on - exact while ENHANCE.radius stays integral. --- crates/engine/src/cmd/smartselect_cmds.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/engine/src/cmd/smartselect_cmds.rs b/crates/engine/src/cmd/smartselect_cmds.rs index 415fdc32439..f1c1bebaec1 100644 --- a/crates/engine/src/cmd/smartselect_cmds.rs +++ b/crates/engine/src/cmd/smartselect_cmds.rs @@ -136,6 +136,7 @@ const RIM_SIGMA: f32 = ENHANCE.radius; const RIM_DEPTH: f32 = 0.01; /// Pixels of halo a tile reads around itself. [`matting::gaussian_blur`] truncates its kernel at /// three sigma, so this is exactly the reach of the neighbourhood a pixel is measured against. +/// ceil(3 * sigma) + 1; exact while [`ENHANCE`].radius stays integral. const RIM_HALO: i32 = 3 * ENHANCE.radius as i32 + 1; /// `cut` with the [`RIM_SIGMA`] soft rim inside its edge, as [`RIM_SIGMA`] describes. The cut is