Struct Circle
- Namespace
- SpatialNET
- Assembly
- SpatialNET.Extensions.dll
A circle: a centre and a radius (ADR 0026).
public readonly record struct Circle : IEquatable<Circle>Implements
Inherited Members
Constructors
Circle(Coordinate, double)
A circle: a centre and a radius (ADR 0026).
public Circle(Coordinate Centre, double Radius)Parameters
CentreCoordinate-
The centre.
Radiusdouble-
The radius; not negative.
Properties
Centre
The centre.
public Coordinate Centre { get; init; }Property Value
Radius
The radius; not negative.
public double Radius { get; init; }Property Value
Methods
ToPolygon(IGeometryFactory?, int)
The circle as a polygon: 4 * quadrantSegments vertices on the circle, counter-clockwise, the first one east of the
centre. The polygon is inscribed, so it lies inside the circle. A circle without radius has no area and gives an empty polygon.
public IPolygon2D ToPolygon(IGeometryFactory? factory = null, int quadrantSegments = 8)Parameters
factoryIGeometryFactory?-
The factory;
null= SpatialNET.GeometryFactory.Default. quadrantSegmentsint-
Segments per quarter circle; at least 1.
Returns
Exceptions
- ArgumentOutOfRangeException
-
quadrantSegmentsis below 1. - InvalidOperationException
-
No factory available.