From 606e53149b4c1ad4b821eb96406edccf0dabca06 Mon Sep 17 00:00:00 2001 From: Nick Laws Date: Wed, 23 Jun 2021 20:35:52 -0600 Subject: [PATCH] rm map function to fix overflow error with large Polygons --- src/GeometricalPredicates.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GeometricalPredicates.jl b/src/GeometricalPredicates.jl index 718017b..f47f356 100644 --- a/src/GeometricalPredicates.jl +++ b/src/GeometricalPredicates.jl @@ -165,8 +165,9 @@ struct Polygon2D{T<:AbstractPoint2D} <: AbstractPolygon2D _p::Vector{T} _l::Vector{AbstractLine2D} function Polygon2D{T}(p::T...) where {T<:AbstractPoint2D} - l = map(1:length(p)-1) do i - Line(p[i], p[i+1]) + l = [] + for i in range(1, stop=length(p)-1) + push!(l, Line(p[i], p[i+1])) end push!(l, Line(p[end], p[1])) new([p...;], l)