lkang2 / glmatrix

Automatically exported from code.google.com/p/glmatrix
0 stars 0 forks source link

mat4.multiply generates a matrix that is filled by NaN #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The code i use is here
---------------------------------------------------------------
function matrisleri_carp(event){

    var input_matrisi1_dizi=document.getElementById("input_matrisi1").value.split(",");
    var input_matrisi2_dizi=document.getElementById("input_matrisi2").value.split(",");
    var input_matrisi1=new Array();
    var input_matrisi2=new Array();
    for(var i=0;i<3;i++){
        input_matrisi1[i]=new Array();
        input_matrisi2[i]=new Array();
        for(var j=0;j<3;j++){
            input_matrisi1[i][j]=input_matrisi1_dizi[i*3+j];
            input_matrisi2[i][j]=input_matrisi2_dizi[i*3+j];
        }
    }
    mat4.multiply(input_matrisi1,input_matrisi2);
    document.getElementById("result_matrisi1").innerHTML=input_matrisi1;
    document.getElementById("result_matrisi2").innerHTML=input_matrisi2;
    }
---------------------------------------------

What is the expected output? What do you see instead?

i expect multiplication of matrices but found
NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,
NaN
at result_matrisi1

i use glMatrix-0.9.5.min.js at windows 7 with firefox4

Original issue reported on code.google.com by mervet2...@gmail.com on 28 Jun 2011 at 11:18

GoogleCodeExporter commented 8 years ago
i see i must mat4.create,
hope it is going to resolve the problem

Original comment by mervet2...@gmail.com on 28 Jun 2011 at 11:24

GoogleCodeExporter commented 8 years ago
the problem is going on
thanks for any reply

Original comment by mervet2...@gmail.com on 28 Jun 2011 at 11:48

GoogleCodeExporter commented 8 years ago
i have allmost the same problem

Original comment by AlexWind...@gmail.com on 24 Aug 2012 at 11:41