Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5428 in orxonox.OLD for trunk/src/lib/collision_detection/lin_alg.h


Ignore:
Timestamp:
Oct 24, 2005, 7:07:00 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed a bug in the CD engine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/lin_alg.h

    r5398 r5428  
    2424void JacobI(float **A,int N,float *D, float **V, int *NROT) {
    2525float  *B, *Z;
    26 double  c,g,h,s,sm,t,tau,theta,tresh;
    27 int     i,j,ip,iq;
    28 
    29 // void *vmblock1 = NULL;
     26double  c=0.0f, g=0.0f, h=0.0f, s=0.0f, sm=0.0f, t=0.0f, tau=0.0f, theta=0.0f, tresh=0.0f;
     27int     i=0,j=0,ip=0,iq=0;
    3028
    3129  //allocate vectors B, Z
    32   //vmblock1 = vminit();
     30
    3331  B = (float *) calloc(100, 32);
    3432  Z = (float *) calloc(100, 32);
    3533
    36   for (ip=1; ip<=N; ip++) {  //initialize V to identity matrix
     34  for(ip=1; ip<=N; ip++) {  //initialize V to identity matrix
    3735    for (iq=1; iq<=N; iq++)  V[ip][iq]=0;
    3836    V[ip][ip]=1;
     
    118116  } //end of main i loop
    119117//  printf("\n 50 iterations !\n");
     118  free(B);
     119  free(Z);
    120120  return;  //too many iterations
    121121}
Note: See TracChangeset for help on using the changeset viewer.