Skip to main content

normalize

Function normalize 

Source
pub fn normalize(
    desktop: VirtualDesktop,
    x: i32,
    y: i32,
) -> Result<(i32, i32), NormalizeError>
Expand description

Convert a global physical pixel into the absolute pair SendInput takes alongside MOUSEEVENTF_VIRTUALDESK.

Rounds to the nearest, and divides by the last pixel rather than the dimension — see the module note. A single-pixel axis (a degenerate display, but expressible) has one reachable coordinate, and it is 0.