multiply method

Matrix3 multiply(
  1. Matrix3 o
)

Multiplies this matrix by the given matrix.

Implementation

Matrix3 multiply(Matrix3 o) =>
    Matrix3(
      a * o.a + b * o.d + c * o.g,
      a * o.b + b * o.e + c * o.h,
      a * o.c + b * o.f + c * o.i,

      d * o.a + e * o.d + f * o.g,
      d * o.b + e * o.e + f * o.h,
      d * o.c + e * o.f + f * o.i,

      g * o.a + h * o.d + i * o.g,
      g * o.b + h * o.e + i * o.h,
      g * o.c + h * o.f + i * o.i,
    );