new Tiny.Circle(x, y, radius)
Name | Type | Default | Description |
---|---|---|---|
x |
number | 0 |
optional
The X coordinate of the center of this circle |
y |
number | 0 |
optional
The Y coordinate of the center of this circle |
radius |
number | 0 |
optional
The radius of the circle |
Members
-
radiusnumber
-
- Default Value:
- 0
-
readonlytypenumber
-
The type of the object, mainly used to avoid
instanceof
checks- Default Value:
- Tiny.SHAPES.CIRC
- See:
-
xnumber
-
- Default Value:
- 0
-
ynumber
-
- Default Value:
- 0
Methods
-
clone() ❯ {Tiny.Circle}
-
Creates a clone of this Circle instance
Returns:
Type Description Tiny.Circle a copy of the Circle -
contains(x, y) ❯ {boolean}
-
Checks whether the x and y coordinates given are contained within this circle
Name Type Description x
number The X coordinate of the point to test
y
number The Y coordinate of the point to test
Returns:
Type Description boolean Whether the x/y coordinates are within this Circle -
getBounds() ❯ {Tiny.Rectangle}
-
Returns the framing rectangle of the circle as a Rectangle object
Returns:
Type Description Tiny.Rectangle the framing rectangle