pub fn predict_grid_position<F: Float>(
grid: &HashMap<GridIndex, Point2<F>>,
idx: GridIndex,
) -> Option<Point2<F>>Expand description
Predict a grid corner’s position from its cardinal neighbors.
Uses midpoint averaging:
- Horizontal:
0.5 * (P(i-1,j) + P(i+1,j)) - Vertical:
0.5 * (P(i,j-1) + P(i,j+1))
Returns the average of available predictions, or None if no complete
neighbor pair exists (need at least one horizontal or vertical pair).