Circle
Represents a circle shape with position and radius.
Constructor
-
Circle() → Circle -
Circle(radius: float) → Circle -
Circle(pos: Vec2, radius: float) → Circle -
Circle(x: float, y: float, radius: float) → Circle
Represents a circle shape with position and radius.
Properties
| Name | Description | Type |
|---|---|---|
pos | The center position of the circle as a Vec2. | Vec2 |
radius | The radius of the circle. | float |
area | Return the area of the circle. | float |
circumference | Return the circumference of the circle. | float |
Methods
As Rect
as_rect() → RectReturn the smallest rectangle that fully contains the circle.
Copy
copy() → CircleReturn a copy of the circle.