Circle
Represents a circle shape with position and radius.
Constructor
-
Circle(pos: Vec2, radius: SupportsFloat) → Circle -
Circle(
x: SupportsFloat,
y: SupportsFloat,
radius: SupportsFloat
) → Circle
Represents a circle shape with position and radius.
Properties
| Name | Description | Type |
|---|---|---|
area | Return the area of the circle. | float |
circumference | Return the circumference of the circle. | float |
pos | The center position of the circle as a Vec2. | Vec2 |
radius | The radius 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.