applyMatrix method
Implementation
void applyMatrix(Array mat) {
var fullMatrix = Array.identity(3);
// get a 3x3 matrix from a 2x2 matrix
fullMatrix = fullMatrix.map((identityValue, pos) =>
(pos.item1 >= mat.shape.item1) || (pos.item2 >= mat.shape.item2)
? identityValue
: mat.getValue(pos));
applyOverPoints(func: (pt) => pt.matMul(fullMatrix));
}