pub fn tile_raycast(
    origin: Vector2<f64>,
    dir: Vector2<f64>,
    max_dir: f64,
    func: impl FnMut(Vector2<i32>, Vector2<f64>, Vector2<i32>) -> bool
)
Examples found in repository?
examples/tile.rs (lines 4-12)
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    tile_raycast(
        Vector2::new(0.0, 1.0),
        Vector2::new(-1.0, 0.5),
        4.0,
        |index, hit_pos, hit_normal| {
            println!("{index:?} {hit_pos:?} {hit_normal:?}");
            false // to continue ray
        },
    )
}