Skip to content

Commit

Permalink
Merge 606e531 into 4ab422e
Browse files Browse the repository at this point in the history
  • Loading branch information
NLaws committed Jun 24, 2021
2 parents 4ab422e + 606e531 commit 5e7c29a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/GeometricalPredicates.jl
Expand Up @@ -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)
Expand Down

0 comments on commit 5e7c29a

Please sign in to comment.