Sector

data class Sector(val center: Vector2, val radius: Double, val angle0: Double, val angle1: Double) : LinearType<Sector> , GeometricPrimitive2D(source)

Represents a sector defined by a center point, a radius, and a range of angles.

Constructors

Link copied to clipboard
constructor(center: Vector2, radius: Double, angle0: Double, angle1: Double)

Properties

Link copied to clipboard

The starting angle of the sector, in degrees.

Link copied to clipboard

The ending angle of the sector, in degrees.

Link copied to clipboard

The area of the sector.

Link copied to clipboard
val center: Vector2

The center point of the sector.

Link copied to clipboard
val contour: ShapeContour

A computed property that provides a closed ShapeContour representation of the sector, connecting both ends of an arc to its center.

Link copied to clipboard

The perimeter of the sector, including its two sides and the arc.

Link copied to clipboard

The radius of the sector.

Functions

Link copied to clipboard
fun arcPosition(t: Double): Vector2

Calculates the position of a point along the arc at a specified parameter t. The parameter t interpolates between the starting and ending angles of the arc.

Link copied to clipboard

Returns the conjugate of this sector: the complementary portion of the circle starting where this arc ends and ending where this arc starts. Together, a sector and its conjugate form a full circle.

Link copied to clipboard
open operator override fun div(scale: Double): Sector
Link copied to clipboard
open operator override fun minus(right: Sector): Sector
Link copied to clipboard
open operator override fun plus(right: Sector): Sector
Link copied to clipboard
open operator override fun times(scale: Double): Sector