pub fn screen_fixed_split_error(
a: &[u8],
b: &[u8],
width: usize,
height: usize,
offset: (i32, i32),
mask: Option<(&[u8], u8)>,
radius: i32,
points: &[i64],
) -> (f64, f64, f64)Expand description
The cost of the points at offset and its runner-up (the lowest cost more than two pixels away, within radius),
when the region may hold a screen-fixed part: each point costs the smaller of its plain error at zero
(refine_native_at’s per-point cost) and its sampling-insensitive error at the offset
(sampling_insensitive_error’s per-point cost). A point that stayed where it was on screen (a search bar or
status bar floating over a map, a sticky panel) then does not count against the offset the rest moved by, and the
rest may have moved by a fraction of a pixel, as a decelerating fling does. A frame that did not move matches at
zero everywhere, so every offset then costs about the same as the runner-up. Infinite where fewer than 12 points
fall inside both frames, as in the plain cost. The third value is the share of the points the offset explains
better than zero, among those one of the two explains better: the part that moved, against the part that stayed.