private PVector MatrixToVec(float[][] m) { PVector v = new PVector(); v.X = m[0][0]; v.Y = m[1][0]; if (m.Length > 2) { v.Z = m[2][0]; } return(v); }
public PVector MatMul(float[][] a, PVector b) { float[][] m = VecToMatrix(b); return(MatrixToVec(MatMul(a, m))); }