Skip to content

arithmetic

  • .add(...m: (Matrix | number)[]) : Element-wise addition with one or more matrices or scalars.
  • .sub(...m: (Matrix | number)[]) : Element-wise subtraction with one or more matrices or scalars.
  • .mul(...m: (Matrix | number)[]) : Element-wise multiplication with one or more matrices or scalars.
  • .div(...m: (Matrix | number)[]) : Element-wise division with one or more matrices or scalars.
  • .modulo(...m: (Matrix | number)[]) : Element-wise modulo operation with one or more matrices or scalars.
  • .dot(m: Matrix) : Matrix multiplication (linear algebra dot product).