vec2-fn
    Preparing search index...

    Function copy

    • Copy one vectors values to another.

      Type Parameters

      Parameters

      • target: Vec2Param

        Target to be copied from.

      • dest: D

        The destination object.

      Returns D

      • The destination object reference.
      const result = { x: 0, y: 0 };
      copy({ x: 3, y: 4 }, result); // result -> { x: 3, y: 4 }