31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95 constexpr Circ(
const Vector<T, 2>& circCenter, T circRadius)
noexcept
192 return gf::squareDistance(
center, other.center) <=
gf::square(
radius + other.radius);
220 using CircZ =
Circ<std::size_t>;
224 extern template struct Circ<
float>;
225 extern template struct Circ<
int>;
226 extern template struct Circ<
unsigned>;
240 return lhs.center == rhs.center && lhs.radius == rhs.radius;
254 return lhs.center != rhs.center || lhs.radius != rhs.radius;
257 #ifndef DOXYGEN_SHOULD_SKIP_THIS
T radius
Radius of the circle.
Definition: Circ.h:74
constexpr Vector< T, 2 > getBottom() const noexcept
Get the bottom of the circle.
Definition: Circ.h:151
constexpr T getRadius() const noexcept
Get the radius of the circle.
Definition: Circ.h:122
constexpr Vector< T, 2 > getLeft() const noexcept
Get the left of the circle.
Definition: Circ.h:160
constexpr Vector< T, 2 > getTop() const noexcept
Get the top of the circle.
Definition: Circ.h:142
bool intersects(const Circ< T > &other) const noexcept
Check the intersection between two circles.
Definition: Circ.h:191
constexpr Circ() noexcept
Default constructor.
Definition: Circ.h:82
bool operator==(const Circ< T > &lhs, const Circ< T > &rhs)
Equality operator.
Definition: Circ.h:239
Utility class for manipulating circles.
Definition: Circ.h:72
constexpr Vector< T, 2 > getRight() const noexcept
Get the right of the circle.
Definition: Circ.h:169
constexpr bool isEmpty() const noexcept
Check if the circle is empty.
Definition: Circ.h:133
bool operator!=(const Circ< T > &lhs, const Circ< T > &rhs)
Inequality operator.
Definition: Circ.h:253
bool contains(const Vector< T, 2 > &point) const noexcept
Check if a point is insied a circle's area.
Definition: Circ.h:180
constexpr Vector< T, 2 > getCenter() const noexcept
Get the center of the circle.
Definition: Circ.h:110
Vector< T, 2 > center
Center of the circle.
Definition: Circ.h:73
constexpr Circ(const Vector< T, 2 > &circCenter, T circRadius) noexcept
Construct the circle from center and radius.
Definition: Circ.h:95
General purpose math vector.
Definition: Vector.h:61