Pseudo Code
Matrix () {
make 2D array
setRow(double one,two,three,four);
setCol(double one,two,three,four);
}
3Dtranslate(double x,y,z,t) {
new Matrix;
Matrix.setRow(x,y,z,t);
}
Matrix multiply(matrix1, matrix2) {
for (j = 0; j < 4; j++) {
for (i = 0; i < 4; i++) {
matrix3.set(i,j,multAdd(matrix1.row(i), matrix2.col(j)));
}
}
}
multAdd(row, col) {
out = 0;
for(i=0;i<4;i++) {
out += row[i] * col[i];
}
return out;
}