Function procrustes

    • K Vecs → {centroid, rotation (angle of point[0] about centroid), scale (its distance from centroid)}. Each write is a closed-form transform about the centroid (translate / rotate / scale), so the three are cross-channel invariant. A collapsed cluster makes rotation singular and scale a no-op.

      Parameters

      Returns { centroid: Writable<Vec>; rotation: Writable<Num>; scale: Writable<Num> }