From ad51801c5d0b65d7fd10efc63d35f08602feec99 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 9 Nov 2020 22:06:44 -0800 Subject: [PATCH] minor fixes to rotate() --- masque/traits/rotatable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/masque/traits/rotatable.py b/masque/traits/rotatable.py index 67a9371..1e83697 100644 --- a/masque/traits/rotatable.py +++ b/masque/traits/rotatable.py @@ -24,12 +24,12 @@ class Rotatable(metaclass=ABCMeta): ---- Abstract methods ''' @abstractmethod - def rotate(self: T, theta: float) -> T: + def rotate(self: T, val: float) -> T: """ Rotate the shape around its origin (0, 0), ignoring its offset. Args: - theta: Angle to rotate by (counterclockwise, radians) + val: Angle to rotate by (counterclockwise, radians) Returns: self @@ -56,7 +56,7 @@ class RotatableImpl(Rotatable, metaclass=ABCMeta): @rotation.setter def rotation(self, val: float): - if not is_scalar(val): + if not numpy.size(val) == 1: raise MasqueError('Rotation must be a scalar') self._rotation = val % (2 * pi)