@ac-essentials/misc-util
    Preparing search index...

    Function minmax

    • Calculates the minimum and maximum values from a list of numbers.

      This function iterates through the provided numbers to find the smallest and largest values.

      Its equivalent to calling Math.min and Math.max, but does the iteration only once.

      Parameters

      • ...values: number[]

        The values to calculate the min and max of.

      Returns { max: number; min: number }

      An object containing the min and max values, or min = Infinity and max = -Infinity if no values are provided.