From b316a8863bfe72f7acebe7124bef10830675157f Mon Sep 17 00:00:00 2001 From: Koen Schmeets Date: Sat, 28 Nov 2020 13:50:38 +0100 Subject: [PATCH] Use EXACT for checking theta --- src/clipboard.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/clipboard.cpp b/src/clipboard.cpp index f2d2b95..dbcd1df 100644 --- a/src/clipboard.cpp +++ b/src/clipboard.cpp @@ -260,8 +260,7 @@ void GraphicsWindow::PasteClipboard(Vector trans, double theta, double scale) { case Constraint::Type::HORIZONTAL: case Constraint::Type::VERTICAL: // When rotating 90 or 270 degrees, swap the vertical / horizontal constaints - dbp("Remainder: %f", fmod(theta + (PI / 2), PI)); - if (fmod(theta + (PI/2), PI) == 0) { + if (EXACT(fmod(theta + (PI/2), PI) == 0)) { if(c.type == Constraint::Type::HORIZONTAL) { c.type = Constraint::Type::VERTICAL; } else {