From 5e74579740b995f48d94b28362786487f12e42d5 Mon Sep 17 00:00:00 2001 From: Mike MacHenry Date: Thu, 30 Jul 2015 19:16:05 -0400 Subject: [PATCH] Reorder getDist2 pattern match to allow it to reach currently dead code. --- Graphics/Implicit/ObjectUtil/GetBox2.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Graphics/Implicit/ObjectUtil/GetBox2.hs b/Graphics/Implicit/ObjectUtil/GetBox2.hs index ecd34463..b7ad291d 100644 --- a/Graphics/Implicit/ObjectUtil/GetBox2.hs +++ b/Graphics/Implicit/ObjectUtil/GetBox2.hs @@ -116,11 +116,11 @@ getDist2 p (Translate2 v obj) = getDist2 (p ^+^ v) obj getDist2 p (Circle r) = magnitude p + r +getDist2 p (PolygonR r points) = + r + maximum [magnitude (p ^-^ p') | p' <- points] + getDist2 (x,y) symbObj = let ((x1,y1), (x2,y2)) = getBox2 symbObj in sqrt ((max (abs (x1 - x)) (abs (x2 - x)))^2 + (max (abs (y1 - y)) (abs (y2 - y)))^2) - -getDist2 p (PolygonR r points) = - r + maximum [magnitude (p ^-^ p') | p' <- points]