Module pathfinding::utils
source · Expand description
Miscellaneous utilities
Functions§
- Constrain
valueinto0..upperby adding or subtractingupperas many times as necessary. - Repeatedly call
move_in_directionuntil the returned value isNone. - Move a two-dimensional coordinate into a given direction provided that:
- Return the square root of
nifnis square,Noneotherwise.