@@ -21,7 +21,7 @@ are `Triangle` (N=3), `Quadrangle` (N=4), `Pentagon` (N=5), etc.
2121 `Heptagon`, `Octagon`, `Nonagon`, `Decagon`.
2222"""
2323struct Ngon{N,M<: Manifold ,C<: CRS } <: Polygon{M,C}
24- vertices:: NTuple {N,Point{M,C}}
24+ vertices:: SVector {N,Point{M,C}}
2525 function Ngon {N,M,C} (vertices) where {N,M<: Manifold ,C<: CRS }
2626 if N < 3
2727 throw (ArgumentError (" the number of vertices must be greater than or equal to 3" ))
@@ -30,11 +30,13 @@ struct Ngon{N,M<:Manifold,C<:CRS} <: Polygon{M,C}
3030 end
3131end
3232
33- Ngon {N} (vertices:: NTuple{N,Point{M,C}} ) where {N,M<: Manifold ,C<: CRS } = Ngon {N,M,C} (vertices)
33+ Ngon {N} (vertices:: SVector{N,Point{M,C}} ) where {N,M<: Manifold ,C<: CRS } = Ngon {N,M,C} (vertices)
34+ Ngon {N} (vertices:: NTuple{N,P} ) where {N,P<: Point } = Ngon {N} (SVector (vertices))
3435Ngon {N} (vertices:: Vararg{P,N} ) where {N,P<: Point } = Ngon {N} (vertices)
3536Ngon {N} (vertices:: Vararg{Tuple,N} ) where {N} = Ngon {N} (Point .(vertices))
3637
37- Ngon (vertices:: NTuple{N,Point{M,C}} ) where {N,M<: Manifold ,C<: CRS } = Ngon {N,M,C} (vertices)
38+ Ngon (vertices:: SVector{N,Point{M,C}} ) where {N,M<: Manifold ,C<: CRS } = Ngon {N,M,C} (vertices)
39+ Ngon (vertices:: NTuple{N,P} ) where {N,P<: Point } = Ngon (SVector (vertices))
3840Ngon (vertices:: P... ) where {P<: Point } = Ngon (vertices)
3941Ngon (vertices:: Tuple... ) = Ngon (Point .(vertices))
4042
0 commit comments