Skip to main content

snap

Function snap 

Source
pub fn snap(x: f32, y: f32) -> SnapResult
Expand description

Snap a single (x, y) point to the nearest Eisenstein integer.

Searches the 9 Eisenstein integer candidates around the continuous coordinates and picks the one with the smallest Euclidean distance.