rotate#
- rotate(tangle, angle, inplace=True)#
Rotate a tangle diagram by a multiple of 90 degrees.
Rotation changes the tangle_endpoint labels modulo 4.
- Parameters:
tangle (PlanarDiagram | OrientedPlanarDiagram) – The tangle diagram to rotate.
angle (int) – Rotation angle in degrees (must be 0, 90, 180, or 270).
inplace (bool) – If True, modifies the tangle in place. If False, returns a copy.
- Raises:
ValueError – If angle is not a multiple of 90.
- Returns:
The rotated tangle diagram.
- Return type: