• Guard against an all-zero state: sfc32 and xoshiro128 both treat the zero vector as a fixed point (they would emit only zeros forever). Returns a non-zero substitute if every word is zero, otherwise the words unchanged.

    Parameters

    • words: [number, number, number, number]

      The four candidate state words.

    Returns [number, number, number, number]

    A guaranteed non-zero four-word state.