Function reduce

  • Reduce a vector to a single value using the provided reduce function.

    Parameters

    • v: Vector

      vector

    • func: ((s: number, c: number, i: number) => number)

      reduce function

        • (s: number, c: number, i: number): number
        • Parameters

          • s: number
          • c: number
          • i: number

          Returns number

    • r: number = 0

      initial value

    Returns number

Generated using TypeDoc