Skip to main content

Circle

Circle

Kind: global class

new Circle([x], [y], [r])

A circle or a 2-dimensional sphere. Represented as a position (x,y) and radius (r)

ParamTypeDefaultDescription
[x]Number0
[y]Number0
[r]Number0radius

circle.x : Number

Position along X axis

Kind: instance property of Circle

circle.y : Number

Position along Y axis

Kind: instance property of Circle

circle.r : Number

Radius

Kind: instance property of Circle

circle.readPosition(target)

Kind: instance method of Circle

ParamType
targetVector2

circle.move(deltaX, deltaY)

Kind: instance method of Circle

ParamType
deltaXNumber
deltaYNumber

circle.overlaps(other) ⇒ boolean

Kind: instance method of Circle

ParamType
otherCircle

circle.equals(other) ⇒ boolean

Kind: instance method of Circle

ParamType
otherCircle

circle.set(x, y, r)

Kind: instance method of Circle

ParamType
xnumber
ynumber
rnumber

circle.copy(other)

Kind: instance method of Circle

ParamType
otherCircle

circle.clone() ⇒ Circle

Kind: instance method of Circle