new Circle( [radius])
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
radius |
number |
<optional> |
4 | Radius of this circle |
- Source:
Members
-
radius :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
radius
-
Radius of circle.
- Default Value:
-
- 4
- Source:
Properties:
Name Type Description radius
number -
type :number
-
The type of the object, mainly used to avoid
instanceof
checksType:
- number
- Source:
-
<constant> type :number
-
Type of this shape, should always be
CIRC
.Type:
- number
- Source:
-
x :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
-
y :number
-
Type:
- number
- Default Value:
-
- 0
- Source:
Methods
-
clone()
-
Creates a clone of this Circle instance
- Source:
Returns:
a copy of the Circle
- Type
- Circle
-
contains(x, y)
-
Checks whether the x and y coordinates given are contained within this circle
Parameters:
Name Type Description x
number The X coordinate of the point to test
y
number The Y coordinate of the point to test
- Source:
Returns:
Whether the x/y coordinates are within this Circle
- Type
- boolean
-
getBounds()
-
Returns the framing rectangle of the circle as a Rectangle object
- Source:
Returns:
the framing rectangle
- Type
- Rectangle