MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getPreferredSplatCandidate

Function getPreferredSplatCandidate

src/utils/splatFilePolicy.ts:35–41  ·  view source on GitHub ↗
(
  current: TCandidate | null | undefined,
  candidate: TCandidate
)

Source from the content-addressed store, hash-verified

33}
34
35export function getPreferredSplatCandidate<TCandidate extends SplatCandidate>(
36 current: TCandidate | null | undefined,
37 candidate: TCandidate
38): TCandidate {
39 if (!current) return candidate;
40 return compareSplatCandidates(candidate, current) > 0 ? candidate : current;
41}
42
43export function sortSplatCandidatesByPreference<TCandidate extends SplatCandidate>(
44 candidates: readonly TCandidate[]

Calls 1

compareSplatCandidatesFunction · 0.85

Tested by

no test coverage detected