119 [[nodiscard]]
friend constexpr circle
align(aarectangle haystack, circle needle, alignment alignment)
noexcept
122 if (alignment == horizontal_alignment::left) {
123 return haystack.left() + needle.radius();
125 }
else if (alignment == horizontal_alignment::right) {
126 return haystack.right() - needle.radius();
128 }
else if (alignment == horizontal_alignment::center) {
129 return haystack.center();
137 if (alignment == vertical_alignment::bottom) {
138 return haystack.bottom() + needle.radius();
140 }
else if (alignment == vertical_alignment::top) {
141 return haystack.top() - needle.radius();
143 }
else if (alignment == vertical_alignment::middle) {
144 return haystack.middle();
151 return circle{point2{x, y}, needle.radius()};