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 |
Members
area
the area of the circle
circumference
the length of the circumference of the circle
diameter
the diameter of the circle
Methods
setRadius(r) → {Circle}
set a new radius for the circle
Parameters:
| Name | Type | Description |
|---|---|---|
r |
Number | the new radius |
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 |
Returns:
the translated circle
- Type
- Circle