vec2-fn
    Preparing search index...

    Function min

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

      Type Parameters

      Parameters

      • dest: D

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

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

        The vectors or scalars to take the minimum 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.

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