Function addScaled

  • Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.

    Type Parameters

    Parameters

    • a: BaseArgType

      Operand vector.

    • b: BaseArgType

      Operand vector.

    • scale: number

      Amount to scale b

    • Optional dst: T

      vector to hold result. If not passed in a new one is created.

    Returns T

    A vector that is the sum of a + b * scale.