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


NameDescriptionType
posThe center position of the circle as a Vec2.Vec2
radiusThe radius of the circle.float
areaReturn the area of the circle.float
circumferenceReturn the circumference of the circle.float

Methods


As Rect

as_rect() Rect

Return the smallest rectangle that fully contains the circle.

Copy

copy() Circle

Return a copy of the circle.