Expand description
Miscellaneous utilities
Functionsยง
- constrain
- Constrain
value
into0..upper
by adding or subtractingupper
as many times as necessary. - in_
direction - Repeatedly call
move_in_direction
until the returned value isNone
. - move_
in_ direction - Move a two-dimensional coordinate into a given direction provided that:
- uint_
sqrt - Return the square root of
n
ifn
is square,None
otherwise.