be more consistent about when copies are made

This commit is contained in:
Jan Petykiewicz 2024-07-29 03:13:23 -07:00
commit ef6c5df386
14 changed files with 28 additions and 34 deletions

View file

@ -112,7 +112,7 @@ class PivotableImpl(Pivotable, metaclass=ABCMeta):
""" `[x_offset, y_offset]` """
def rotate_around(self, pivot: ArrayLike, rotation: float) -> Self:
pivot = numpy.array(pivot, dtype=float)
pivot = numpy.asarray(pivot, dtype=float)
cast(Positionable, self).translate(-pivot)
cast(Rotatable, self).rotate(rotation)
self.offset = numpy.dot(rotation_matrix_2d(rotation), self.offset) # type: ignore # mypy#3004