vec2-fn
    Preparing search index...

    Function max

    • Returns the max x and y of a set of vectors.

      Type Parameters

      Parameters

      • dest: D

        Destination the componentwise maximum is written into. Its initial components do not participate in the comparison.

      • ...values: (number | Vec2Param)[]

        The vectors or scalars to take the maximum across.

      Returns D

      • A reference to the modified destination object.

      Error - When a computed component is NaN or non-finite, including when called with no values.

      max({ x: 0, y: 0 }, { x: 1, y: -1 }, { x: 2, y: -2 }); // -> { x: 2, y: -1 }