From 55638fcde517abe9dd7afe5d81f8c9b30ed8f2aa Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 19 May 2020 00:48:22 -0700 Subject: [PATCH] fix placement rotation (float modulo int was always returning 0??) --- fatamorgana/records.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fatamorgana/records.py b/fatamorgana/records.py index 7fcc9df..c8e2d9b 100644 --- a/fatamorgana/records.py +++ b/fatamorgana/records.py @@ -1404,9 +1404,9 @@ class Placement(Record): r = self.repetition is not None f = self.flip - if self.angle is not None and self.angle % 90 == 0 and \ - self.magnification is None or self.magnification == 1: - aa = int((self.angle / 90) % 4) # type: ignore + if ((self.magnification is None or self.magnification == 1) and + ((self.angle is None or abs(self.angle % 90.0) < 1e-14))): + aa = int((self.angle / 90) % 4.0) # type: ignore bools = (c, n, x, y, r, aa & 0b10, aa & 0b01, f) m = False a = False