geo2d.utils.rotated

geo2d.utils.rotated(list_, by)[source]

Rotates an iterable (but only if it supports negative indexing) by the given amount.

Parameters :

list_ : list-like with negative indexing

The list to be rotated.

by : int

The amount, ie. the number of places to rotate in the right direction the list by, 0 returns an identical list. This can also be negative and if so, then it will rotate the list to the left by the amount given.

Previous topic

geo2d.utils.float_to_2pi

Next topic

geo2d.utils.cached_property

This Page