Class: Circle

Circle(center, radius)

the class Circle

Constructor

new Circle(center, radius)

Parameters:
Name Type Description
center Point the coordinates of the circle's center
radius Number the length of the radius of the circle
Source:

Members

area

the area of the circle
Source:

circumference

the length of the circumference of the circle
Source:

diameter

the diameter of the circle
Source:

Methods

setRadius(r) → {Circle}

set a new radius for the circle
Parameters:
Name Type Description
r Number the new radius
Source:
Returns:
the circle with the new radius
Type
Circle

translate(x, y) → {Circle}

translate the circle by the given translation in x- and y-direction
Parameters:
Name Type Description
x Number the translation in the x-direction
y Number the translation in the y-direction
Source:
Returns:
the translated circle
Type
Circle