// ############################## START FUNC ############################################ // This is a help function which creates a 2D matrix in a simple fashion // Integers: n, m, first_dim, second_dim // X matrix: app_matrix function def_matrix(first_dim,second_dim, third_dim, set_all_to) { var app_matrix = new Array(first_dim); var n=0; var m=0; var q=0; // ************ loop *************** if(second_dim>0){ // else, the call is better replaced with new Array... for(n=0;n0){ for(m=0;m0){ for(q=0;q