Skip to main content

collision_path_axis_block_bounds

Function collision_path_axis_block_bounds 

Source
pub(crate) fn collision_path_axis_block_bounds(
    start: f64,
    end: f64,
    max_steps: usize,
) -> Option<(i32, i32)>
Expand description

Returns the inclusive block-coordinate envelope visited by one axis of Vanilla’s block DDA.

Axis crossing counts are independent of inter-axis tie order: the traversal cannot finish until every finite next value is greater than one. Replaying the scalar recurrence also retains the rare terminal step caused by floating-point rounding at next == 1.