Class Circle

Class Documentation

class Circle

The Circle class. Models a common circle.

Public Functions

inline explicit Circle(real_t r)

Construct a circle centerd at the origin.

inline Circle(real_t r, const GeomPoint<2> &center)

Construct a circle given its radius and center.

inline real_t radius() const noexcept

Returns the radius of the circle.

inline GeomPoint<2> center() const noexcept

Returns the center of the circle.

inline real_t area() const

Returns the area.

inline bool is_inside(const GeomPoint<2> &point, real_t tol = rlenvscpp::consts::TOLERANCE) const

Returns true if the given point lies inside the circle.

inline bool is_inside(const real_t x, const real_t y, real_t tol = rlenvscpp::consts::TOLERANCE) const

Returns true if the given spatial point (x, y) lies within the circle.