pub fn sample(g: &Grid<f32>, x: f32, y: f32, edge: XEdge) -> f32
Bilinear value of g at lattice point (x, y), clamped in y and wrapped or clamped in x by edge; 0 for an empty grid or a non-finite point.
g
(x, y)
y
x
edge