MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / Project

Function Project

GTE/Mathematics/Vector.h:595–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593 // a (n-1-reject)-tuple [nonexistent when reject=n-1].
594 template <int32_t N, typename Real>
595 Vector<N - 1, Real> Project(Vector<N, Real> const& v, int32_t reject)
596 {
597 static_assert(N >= 2, "Invalid dimension.");
598 Vector<N - 1, Real> result;
599 for (int32_t i = 0, j = 0; i < N - 1; ++i, ++j)
600 {
601 if (j == reject)
602 {
603 ++j;
604 }
605 result[i] = v[j];
606 }
607 return result;
608 }
609}
610
611

Callers 2

MergeContainersFunction · 0.70
MergeContainersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected