Circle

data class Circle<T : Number, Comparable<T>>(val center: <Error class: unknown class><T>, val radius: T) : Shape<T>

2D circle with given center point and radius.

Since

v2.0.0

Constructors

Link copied to clipboard
constructor(center: <Error class: unknown class><T>, radius: T)

Functions

Link copied to clipboard
open operator override fun contains(point: <Error class: unknown class><T>): Boolean

Returns true if given point is inside this circle.

Link copied to clipboard
open override fun distanceTo(point: <Error class: unknown class><T>): T

Returns the distance between this circle and the given point.

Link copied to clipboard
open infix override fun intersects(circle: Circle<T>): Boolean

Returns true if given circle intersects this circle.

open infix override fun intersects(polygon: Polygon<T>): Boolean

Returns true if given polygon intersects this circle.

open infix override fun intersects(section: Section2<T>): Boolean

Returns true if given section intersects this circle.

open infix override fun intersects(other: Shape<T>): Boolean

Returns true if given other shape intersects this circle.

open infix fun intersects(rectangle: Rectangle<T>): Boolean

Returns true if given rectangle intersects this shape.

Link copied to clipboard
open override fun rotate(angle: <Error class: unknown class><T>): Circle<T>

Returns this circle rotated by given angle around origin point.

open override fun rotate(angle: <Error class: unknown class><T>, pivot: <Error class: unknown class><T>): Circle<T>

Returns this circle rotated by given angle around given pivot point.

Link copied to clipboard
open override fun scale(scale: T): Circle<T>

Returns this circle scaled by given scale value relative to origin point.

open override fun scale(scale: T, center: <Error class: unknown class><T>): Circle<T>

Returns this circle scaled by given scale value relative to given center point.

Link copied to clipboard
open override fun translate(vector: <Error class: unknown class><T>): Circle<T>

Returns this circle translated by given vector.

Properties

Link copied to clipboard
open override val boundingBox: Rectangle<T>

Bounding box of this circle.

Link copied to clipboard
val center: <Error class: unknown class><T>

Center of this circle.

Link copied to clipboard
open override val midpoint: <Error class: unknown class><T>

Midpoint of this circle.

Link copied to clipboard
val radius: T

Radius of this circle.

Link copied to clipboard
open override val type: KClass<T>

Type of coordinates in this circle.