From 59600d07c396d0db1ac7df01b0386c5ba4510bc7 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 25 Aug 2023 10:33:15 +0200 Subject: [PATCH] :zap: Add type hints to `intersect-segments?` fn --- common/src/app/common/geom/shapes/intersect.cljc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/app/common/geom/shapes/intersect.cljc b/common/src/app/common/geom/shapes/intersect.cljc index 331271079b..343855ef01 100644 --- a/common/src/app/common/geom/shapes/intersect.cljc +++ b/common/src/app/common/geom/shapes/intersect.cljc @@ -55,16 +55,16 @@ (and (not= o1 o2) (not= o3 o4)) ;; p1, q1 and p2 colinear and p2 lies on p1q1 - (and (= o1 :coplanar) (on-segment? p2 p1 q1)) + (and (= o1 :coplanar) ^boolean (on-segment? p2 p1 q1)) ;; p1, q1 and q2 colinear and q2 lies on p1q1 - (and (= o2 :coplanar) (on-segment? q2 p1 q1)) + (and (= o2 :coplanar) ^boolean (on-segment? q2 p1 q1)) ;; p2, q2 and p1 colinear and p1 lies on p2q2 - (and (= o3 :coplanar) (on-segment? p1 p2 q2)) + (and (= o3 :coplanar) ^boolean (on-segment? p1 p2 q2)) ;; p2, q2 and p1 colinear and q1 lies on p2q2 - (and (= o4 :coplanar) (on-segment? q1 p2 q2))))) + (and (= o4 :coplanar) ^boolean (on-segment? q1 p2 q2))))) (defn points->lines "Given a set of points for a polygon will return