MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / intersectsCircle

Method intersectsCircle

source/core/StarRect.hpp:951–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949template <typename T, size_t N>
950template <size_t P>
951auto Box<T, N>::intersectsCircle(Coord const& position, T radius) const -> Enable2D<P, bool> {
952 if (contains(position))
953 return true;
954 for (auto const& e : edges()) {
955 if (e.distanceTo(position) <= radius)
956 return true;
957 }
958 return false;
959}
960
961// returns the closest intersection point (from l.min())
962template <typename T, size_t N>

Callers

nothing calls this directly

Calls 1

distanceToMethod · 0.80

Tested by

no test coverage detected