From 012d0ad68efff56a766cc87bb57e713472689811 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Sun, 5 Nov 2023 17:52:07 +0100 Subject: [PATCH] Disable 2*pi Rotate2 identity --- Graphics/Implicit/Canon.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Graphics/Implicit/Canon.hs b/Graphics/Implicit/Canon.hs index 48a7f646..39304517 100644 --- a/Graphics/Implicit/Canon.hs +++ b/Graphics/Implicit/Canon.hs @@ -32,7 +32,6 @@ import Prelude , Ord((<)) , ($) , (<$>) - , pi , length ) import Linear (V2(V2), V3(V3), V4(V4)) @@ -239,7 +238,12 @@ canon2 (Square v) | hasZeroComponent v = emptySpace canon2 (Circle 0) = emptySpace canon2 (Polygon ps) | length ps < 3 = emptySpace canon2 (Rotate2 0 o) = o -canon2 (Rotate2 θ o) | θ == (2*pi) = o +-- TOOD(srk): this "fixes" (more like hides) the problem +-- with polygon under rotation described in #449 +-- so we keep it disabled for now +-- needs import Data.Fixed (mod') and Prelude (pi) +-- canon2 (Rotate2 θ o) | θ `mod'` (2*pi) == 0 = o + -- ignore if zeroes, TODO(srk): produce warning -- TODO(srk): produce warning and ignore if we get a non-invertible matrix canon2 (Transform2