static Vec2D transformMat2D(Vec2D o, Vec2D a, Mat2D m) { final x = a.x; final y = a.y; o.x = m[0] * x + m[2] * y + m[4]; o.y = m[1] * x + m[3] * y + m[5]; return o; }