# Circle

data class Circle(val center: Vector2, val radius: Double) : Movable, Scalable1D, ShapeProvider, ShapeContourProvider

Creates a Circle.

Alternatively, see Ellipse.

## Constructors

fun Circle(    x: Double,     y: Double,     radius: Double)

object Companion

## Functions

operator fun contains(point: Vector2): Boolean

Returns true if given point lies inside the Shape.

operator fun div(scale: Double): Circle
operator fun minus(right: Circle): Circle
open override fun movedBy(offset: Vector2): Circle

Creates a new shape with the same size but the current position offset by the given amount.

open override fun movedTo(center: Vector2): Circle

Creates a new Circle with center at center.

operator fun plus(right: Circle): Circle
open fun position(uv: Vector2): Vector2

Returns a position in the bounding box for a parameterized uv value between (`0.0`, `0.0`) and (`1.0`, `1.0`) where (`0.5`, `0.5`) is the center of the bounding box.

open override fun position(u: Double, v: Double): Vector2

Returns a position in the bounding box for parameterized values u and v between `0.0` and `1.0` where (`0.5`, `0.5`) is the center of the bounding box.

open override fun scaledBy(    scale: Double,     uAnchor: Double,     vAnchor: Double): Circle

Creates a new shape with dimensions scaled by scale.

open override fun scaledTo(radius: Double): Circle

Creates a new Circle at the same position with the given radius.

fun tangents(point: Vector2): Pair<Vector2, Vector2>

Calculates the tangent lines through an external point.

fun tangents(other: Circle, isInner: Boolean = false): List<Pair<Vector2, Vector2>>

Calculates the tangent lines between two Circles.

operator fun times(scale: Double): Circle

## Properties

val area: Double
val center: Vector2
open override val contour: ShapeContour

Returns ShapeContour representation of the Circle.

val corner: Vector2

The top-left corner of the Circle.