32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
96 constexpr Circ(
const Vector<T, 2>& circCenter, T circRadius)
noexcept
193 return gf::squareDistance(
center, other.center) <=
gf::square(
radius + other.radius);
221 using CircZ =
Circ<std::size_t>;
225 extern template struct Circ<
float>;
226 extern template struct Circ<
int>;
227 extern template struct Circ<
unsigned>;
241 return lhs.center == rhs.center && lhs.radius == rhs.radius;
255 return lhs.center != rhs.center || lhs.radius != rhs.radius;
258 #ifndef DOXYGEN_SHOULD_SKIP_THIS
T radius
Radius of the circle.
Definition: Circ.h:75
constexpr Vector< T, 2 > getBottom() const noexcept
Get the bottom of the circle.
Definition: Circ.h:152
constexpr T getRadius() const noexcept
Get the radius of the circle.
Definition: Circ.h:123
constexpr Vector< T, 2 > getLeft() const noexcept
Get the left of the circle.
Definition: Circ.h:161
constexpr Vector< T, 2 > getTop() const noexcept
Get the top of the circle.
Definition: Circ.h:143
bool intersects(const Circ< T > &other) const noexcept
Check the intersection between two circles.
Definition: Circ.h:192
constexpr Circ() noexcept
Default constructor.
Definition: Circ.h:83
bool operator==(const Circ< T > &lhs, const Circ< T > &rhs)
Equality operator.
Definition: Circ.h:240
Utility class for manipulating circles.
Definition: Circ.h:73
constexpr Vector< T, 2 > getRight() const noexcept
Get the right of the circle.
Definition: Circ.h:170
constexpr bool isEmpty() const noexcept
Check if the circle is empty.
Definition: Circ.h:134
bool operator!=(const Circ< T > &lhs, const Circ< T > &rhs)
Inequality operator.
Definition: Circ.h:254
bool contains(const Vector< T, 2 > &point) const noexcept
Check if a point is insied a circle's area.
Definition: Circ.h:181
constexpr Vector< T, 2 > getCenter() const noexcept
Get the center of the circle.
Definition: Circ.h:111
Vector< T, 2 > center
Center of the circle.
Definition: Circ.h:74
constexpr Circ(const Vector< T, 2 > &circCenter, T circRadius) noexcept
Construct the circle from center and radius.
Definition: Circ.h:96
General purpose math vector.
Definition: Vector.h:60