Module pathfinding::utils

source ·
Expand description

Miscellaneous utilities

Functions§

  • Constrain value into 0..upper by adding or subtracting upper as many times as necessary.
  • Repeatedly call move_in_direction until the returned value is None.
  • Move a two-dimensional coordinate into a given direction provided that:
  • Return the square root of n if n is square, None otherwise.