Chalkboard - v3.0.4
    Preparing search index...

    Function negate

    • Calculates the negation of all the elements of an array.

      Parameters

      • arr: number[]

        The array

      Returns number[]

      const result = Chalkboard.stat.negate([1, -2, 3]); // Returns [-1, 2, -3]