Bitbybit Docs
    Preparing search index...

    Variable uniqueVectorsConst

    uniqueVectors: (
        vectors: readonly number[][],
        tolerance: number,
    ) => UniqueVectors

    Keeps the first of every group of vectors that agree within tolerance in each component, and says for every vector given which kept one it matched: the first in order, as a plain scan finds. Kept vectors are filed in a grid of cells a few tolerances wide, so a vector is compared only with those in the cells it could match. The grid only narrows the candidates; every one is still compared component by component. A vector the grid cannot place (a component not finite, a tolerance that is not positive and finite, a magnitude where the cell arithmetic stops being exact) is compared with every kept vector instead, and kept ones of that kind are held apart, where the grid path looks too.

    Type Declaration

      • (vectors: readonly number[][], tolerance: number): UniqueVectors
      • Parameters

        • vectors: readonly number[][]
        • tolerance: number

        Returns UniqueVectors