# Circle

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

Creates a Circle.

Alternatively, see Ellipse.

## Constructors

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

Companion
common
object Companion

## Functions

contains
common
fun contains(point: Vector2): Boolean

Returns true if given point lies inside the Shape.

div
common
operator fun div(scale: Double): Circle
minus
common
operator fun minus(right: Circle): Circle
moved
common
fun moved(offset: Vector2): Circle

Creates a new Circle with the current center offset by offset.

movedBy
common
open override fun movedBy(offset: Vector2): Circle

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

movedTo
common
open override fun movedTo(center: Vector2): Circle

Creates a new Circle with center at center.

plus
common
operator fun plus(right: Circle): Circle
position
common
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.

scaled
common
fun scaled(scale: Double): Circle

Creates a new Circle with the scale specified as a multiplier for the current radius.

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

Creates a new shape with dimensions scaled by scale.

scaledTo
common
open override fun scaledTo(radius: Double): Circle

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

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

Calculates the tangent lines through an external point.

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

Calculates the tangent lines between two Circles.

times
common
operator fun times(scale: Double): Circle

## Properties

center
common
val center: Vector2
contour
common
open override val contour: ShapeContour

Returns ShapeContour representation of the Circle.

corner
common
val corner: Vector2

The top-left corner of the Circle.

common