Skip to content

Commit

Permalink
fix: parametric type arguments for Polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
fjebaker committed Feb 3, 2025
1 parent 7047415 commit b319b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/corona/profiles/voronoi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ end
getproperarea(vdp::VoronoiDiscProfile, m::AbstractMetric) =
map(p -> getproperarea(p, m), vdp.polys)

function unpack_polys(
polys::AbstractVector{GeometryBasics.Polygon{2,T,GeometryBasics.Point2{T},L,V}},
) where {T,L,V}
function unpack_polys(polys::AbstractVector{GeometryBasics.Polygon{2,T}}) where {T}
map(polys) do poly
map(SVector{2,T}, getpoints(poly))
end
Expand Down
4 changes: 1 addition & 3 deletions src/geometry/geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ getorientation(line::GeometryBasics.AbstractPolygon, p) = getorientation(line.po
end
end

function getcycliclines(
poly::GeometryBasics.Polygon{2,T,GeometryBasics.Point2{T},L,V},
) where {T,L,V}
function getcycliclines(poly::GeometryBasics.Polygon{2})
lines = poly.exterior.points
vcat(lines, GeometryBasics.Line(lines[end].points[2], lines[1].points[1]))
end
Expand Down

0 comments on commit b319b2f

Please sign in to comment.