Circle
A representation of a circle shape with basic geometric operations and collision detection.
Constructor
Circle(pos: Vec2, radius: float)Parameters
pos: Center position of the circle.radius: Radius of the circle.
Properties
| Name | Description | Type |
|---|---|---|
pos | The circle's position | Vec2 |
radius | The circle's radius | float |
area | The area of the circle | float |
circumference | The circumference of the circle | float |
Methods
As Rect
as_rect() → RectGet the bounding rectangle of the circle.
Returns
Rect : The bounding rectangle of the circle.
Copy
copy() → CircleCreate a copy of the circle.
Returns
Circle : A new circle with the same properties.