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

Method distanceTo

source/core/StarLine.hpp:222–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221 template <size_t P = N>
222 typename std::enable_if<P == 2 && N == P, T>::type distanceTo(VectorType const& l, bool infinite = false) const {
223 auto t = lineProjection(l);
224 if (!infinite)
225 t = clamp<T>(t, 0, 1);
226 return vmag(l - eval(t));
227 }
228
229 template <size_t P = N>
230 typename std::enable_if<P == 2 && N == P, void>::type rotate(

Callers 5

produceConstellationsMethod · 0.80
intersectsCircleMethod · 0.80
distanceMethod · 0.80
TESTFunction · 0.80
lineIntersectsCircleMethod · 0.80

Calls 1

vmagFunction · 0.85

Tested by 1

TESTFunction · 0.64