@equinor/videx-linear-algebra
    Preparing search index...

    Function sub

    • a - b

      Component-wise subtraction of two n-dimensional vectors. Target is used to store the results.

      Type Parameters

      Parameters

      • a: T

        Left operand

      • b: VectorLike

        Right operand

      • target: T = a

        Target for storing the results (Default: a)

      Returns T

      Resulting vector

      sub([4, 3], [2, 1], new Array(2)); // Returns: [2, 2]