From c9d27804181d81dedaa841d2d099045ffd9c8a37 Mon Sep 17 00:00:00 2001 From: Cyrille Henry Date: Thu, 24 Feb 2011 18:38:19 +0000 Subject: replace & by && svn path=/trunk/externals/pmpd/; revision=14959 --- pmpd.c | 172 +++++++++++++++++------------------ pmpd2d.c | 274 +++++++++++++++++++++++++++---------------------------- pmpd3d.c | 312 +++++++++++++++++++++++++++++++-------------------------------- 3 files changed, 379 insertions(+), 379 deletions(-) diff --git a/pmpd.c b/pmpd.c index 8c56c11..c73087d 100644 --- a/pmpd.c +++ b/pmpd.c @@ -182,7 +182,7 @@ void pmpd_bang(t_pmpd *x) { L = x->link[i].mass1->posX - x->link[i].mass2->posX; absL = fabs(L); - if ( (absL >= x->link[i].Lmin) & (absL < x->link[i].Lmax) & (L !=0)) + if ( (absL >= x->link[i].Lmin) && (absL < x->link[i].Lmax) && (L !=0)) { if (x->link[i].lType == 2) { // K et D viennent d'une table @@ -221,7 +221,7 @@ void pmpd_mass(t_pmpd *x, t_symbol *Id, t_float mobile, t_float M, t_float posX void pmpd_create_link(t_pmpd *x, t_symbol *Id, int mass1, int mass2, t_float K, t_float D, t_float Pow, t_float Lmin, t_float Lmax, t_int type) { // create a link based on mass number - if ((x->nb_mass>0) & (mass1 != mass2) & (mass1 >= 0) & (mass2 >= 0) & (mass1 < x->nb_mass) & (mass2 < x->nb_mass) ) + if ((x->nb_mass>0) && (mass1 != mass2) && (mass1 >= 0) && (mass2 >= 0) && (mass1 < x->nb_mass) && (mass2 < x->nb_mass) ) { x->link[x->nb_link].lType = type; x->link[x->nb_link].Id = Id; @@ -258,12 +258,12 @@ void pmpd_link(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) if (argc > 7) Lmax = atom_getfloatarg(7, argc, argv); // post("%d,%d, %f,%f", mass1, mass2, K, D); - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd_create_link(x, Id, mass1, mass2, K, D, Pow, Lmin, Lmax, 0); } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -274,7 +274,7 @@ void pmpd_link(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -285,7 +285,7 @@ void pmpd_link(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -315,7 +315,7 @@ void pmpd_tabLink(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) t_float Dl = atom_getfloatarg(6, argc, argv); if (Dl <= 0) Dl = 1; - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd_create_link(x, Id, mass1, mass2, 1, 1, 1, -1000000, 1000000, 2); x->link[x->nb_link-1].arrayK = arrayK; @@ -324,7 +324,7 @@ void pmpd_tabLink(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) x->link[x->nb_link-1].D_L = Dl; } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -339,7 +339,7 @@ void pmpd_tabLink(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -354,7 +354,7 @@ void pmpd_tabLink(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -380,13 +380,13 @@ void pmpd_setK(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -402,13 +402,13 @@ void pmpd_setD(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -424,13 +424,13 @@ void pmpd_setL(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -440,13 +440,13 @@ void pmpd_setL(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = x->link[tmp].mass2->posX - x->link[tmp].mass1->posX; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argc == 1 ) ) { for (i=0; i< x->nb_link; i++) { @@ -463,13 +463,13 @@ void pmpd_setLKTab(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float K_l = atom_getfloatarg(1, argc, argv); if (K_l <= 0) K_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K_L = K_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -486,13 +486,13 @@ void pmpd_setLDTab(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float D_l = atom_getfloatarg(1, argc, argv); if (D_l <= 0) D_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D_L = D_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -508,13 +508,13 @@ void pmpd_setLinkId(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_link; i++) { @@ -530,13 +530,13 @@ void pmpd_setMassId(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -607,13 +607,13 @@ void pmpd_forceX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -630,7 +630,7 @@ void pmpd_posX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -639,7 +639,7 @@ void pmpd_posX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceX = 0; // ??? TODO : esce la bonne chose a faire? } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -658,13 +658,13 @@ void pmpd_setD2(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].D2 = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -674,7 +674,7 @@ void pmpd_setD2(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { for (i=0; i< x->nb_mass; i++) { @@ -687,13 +687,13 @@ void pmpd_setSpeedX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -709,13 +709,13 @@ void pmpd_addPosX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -731,13 +731,13 @@ void pmpd_setForceX(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -756,10 +756,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) t_atom toout[2]; toget = atom_getsymbolarg(0, argc, argv); - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -767,7 +767,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -780,7 +780,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argc == 1) ) + if ( (toget == gensym("massesPos")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -790,10 +790,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -801,7 +801,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -814,7 +814,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argc == 1) ) + if ( (toget == gensym("massesPosName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -824,10 +824,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -835,7 +835,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -848,7 +848,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argc == 1) ) + if ( (toget == gensym("massesSpeeds")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -858,10 +858,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -869,7 +869,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -882,7 +882,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argc == 1) ) + if ( (toget == gensym("massesSpeedsName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -892,10 +892,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -903,7 +903,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -916,7 +916,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argc == 1) ) + if ( (toget == gensym("massesForces")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -926,10 +926,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -937,7 +937,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -950,7 +950,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argc == 1) ) + if ( (toget == gensym("massesForcesName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -960,10 +960,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -972,7 +972,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -986,7 +986,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argc == 1) ) + if ( (toget == gensym("linksPos")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -997,10 +997,10 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->link[i].Id); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -1009,7 +1009,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -1023,7 +1023,7 @@ void pmpd_get(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argc == 1) ) + if ( (toget == gensym("linksPosName")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -1079,7 +1079,7 @@ void pmpd_massesPosT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1098,7 +1098,7 @@ void pmpd_massesPosT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1109,7 +1109,7 @@ void pmpd_massesPosT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1129,7 +1129,7 @@ void pmpd_massesSpeedsT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1148,7 +1148,7 @@ void pmpd_massesSpeedsT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1159,7 +1159,7 @@ void pmpd_massesSpeedsT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1179,7 +1179,7 @@ void pmpd_massesForcesT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1198,7 +1198,7 @@ void pmpd_massesForcesT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1209,7 +1209,7 @@ void pmpd_massesForcesT(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1232,7 +1232,7 @@ void pmpd_massesPosMean(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) sommeX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1270,7 +1270,7 @@ void pmpd_massesPosStd(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) stdX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1319,7 +1319,7 @@ void pmpd_massesForcesMean(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) sommeX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1357,7 +1357,7 @@ void pmpd_massesForcesStd(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) stdX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1406,7 +1406,7 @@ void pmpd_massesSpeedsMean(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) sommeX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1444,7 +1444,7 @@ void pmpd_massesSpeedsStd(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) stdX = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { diff --git a/pmpd2d.c b/pmpd2d.c index fe35cd9..7737b97 100644 --- a/pmpd2d.c +++ b/pmpd2d.c @@ -201,7 +201,7 @@ void pmpd2d_bang(t_pmpd2d *x) Ly = x->link[i].mass1->posY - x->link[i].mass2->posY; L = sqrt( sqr(Lx) + sqr(Ly) ); - if ( (L >= x->link[i].Lmin) & (L < x->link[i].Lmax) & (L != 0)) + if ( (L >= x->link[i].Lmin) && (L < x->link[i].Lmax) && (L != 0)) { if (x->link[i].lType == 2) { // K et D viennent d'une table @@ -255,7 +255,7 @@ void pmpd2d_mass(t_pmpd2d *x, t_symbol *Id, t_float mobile, t_float M, t_float p void pmpd2d_create_link(t_pmpd2d *x, t_symbol *Id, int mass1, int mass2, t_float K, t_float D, t_float Pow, t_float Lmin, t_float Lmax, t_int type) { // create a link based on mass number - if ((x->nb_mass>1) & (mass1 != mass2) & (mass1 >= 0) & (mass2 >= 0) & (mass1 < x->nb_mass) & (mass2 < x->nb_mass) ) + if ((x->nb_mass>1) && (mass1 != mass2) && (mass1 >= 0) && (mass2 >= 0) && (mass1 < x->nb_mass) && (mass2 < x->nb_mass) ) { x->link[x->nb_link].lType = type; x->link[x->nb_link].Id = Id; @@ -292,12 +292,12 @@ void pmpd2d_link(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) if (argc > 7) Lmax = atom_getfloatarg(7, argc, argv); // post("%d,%d, %f,%f", mass1, mass2, K, D); - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd2d_create_link(x, Id, mass1, mass2, K, D, Pow, Lmin, Lmax, 0); } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -308,7 +308,7 @@ void pmpd2d_link(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -319,7 +319,7 @@ void pmpd2d_link(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -357,14 +357,14 @@ void pmpd2d_tLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_float Lmax = 1000000; if (argc > 9) Lmax = atom_getfloatarg(7, argc, argv); - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd2d_create_link(x, Id, mass1, mass2, K, D, Pow, Lmin, Lmax, 1); x->link[x->nb_link-1].VX = vecteurX; x->link[x->nb_link-1].VY = vecteurY; } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -377,7 +377,7 @@ void pmpd2d_tLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -390,7 +390,7 @@ void pmpd2d_tLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -425,7 +425,7 @@ void pmpd2d_tabLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_float Dl = atom_getfloatarg(6, argc, argv); if (Dl <= 0) Dl = 1; - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd2d_create_link(x, Id, mass1, mass2, 1, 1, 1, 0, 1000000, 2); x->link[x->nb_link-1].arrayK = arrayK; @@ -434,7 +434,7 @@ void pmpd2d_tabLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) x->link[x->nb_link-1].D_L = Dl; } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -449,7 +449,7 @@ void pmpd2d_tabLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -464,7 +464,7 @@ void pmpd2d_tabLink(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -491,13 +491,13 @@ void pmpd2d_setK(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -513,13 +513,13 @@ void pmpd2d_setD(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -535,13 +535,13 @@ void pmpd2d_setL(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -551,13 +551,13 @@ void pmpd2d_setL(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = x->link[tmp].mass2->posX - x->link[tmp].mass1->posX; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argc == 1 ) ) { for (i=0; i< x->nb_link; i++) { @@ -574,13 +574,13 @@ void pmpd2d_setLKTab(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float K_l = atom_getfloatarg(1, argc, argv); if (K_l <= 0) K_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K_L = K_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -597,13 +597,13 @@ void pmpd2d_setLDTab(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float D_l = atom_getfloatarg(1, argc, argv); if (D_l <= 0) D_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D_L = D_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -619,13 +619,13 @@ void pmpd2d_setLinkId(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_link; i++) { @@ -641,13 +641,13 @@ void pmpd2d_setMassId(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -664,13 +664,13 @@ void pmpd2d_forceX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -687,13 +687,13 @@ void pmpd2d_forceY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceY += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -710,14 +710,14 @@ void pmpd2d_force(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX += atom_getfloatarg(1, argc, argv); x->mass[tmp].forceY += atom_getfloatarg(2, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -735,7 +735,7 @@ void pmpd2d_posX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -744,7 +744,7 @@ void pmpd2d_posX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceX = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -764,7 +764,7 @@ void pmpd2d_posY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -773,7 +773,7 @@ void pmpd2d_posY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceY = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -792,7 +792,7 @@ void pmpd2d_pos(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -804,7 +804,7 @@ void pmpd2d_pos(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceY = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -902,13 +902,13 @@ void pmpd2d_setD2(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].D2 = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -918,7 +918,7 @@ void pmpd2d_setD2(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { for (i=0; i< x->nb_mass; i++) { @@ -931,13 +931,13 @@ void pmpd2d_setSpeedX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -953,13 +953,13 @@ void pmpd2d_setSpeedY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedY = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -975,14 +975,14 @@ void pmpd2d_setSpeed(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedX = atom_getfloatarg(1, argc, argv); x->mass[tmp].speedY = atom_getfloatarg(2, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -999,13 +999,13 @@ void pmpd2d_addPosX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1021,13 +1021,13 @@ void pmpd2d_addPosY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posY += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1043,14 +1043,14 @@ void pmpd2d_addPos(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posX += atom_getfloatarg(1, argc, argv); x->mass[tmp].posY += atom_getfloatarg(2, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1067,13 +1067,13 @@ void pmpd2d_setForceX(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1089,13 +1089,13 @@ void pmpd2d_setForceY(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceY = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1111,14 +1111,14 @@ void pmpd2d_setForce(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX = atom_getfloatarg(1, argc, argv); x->mass[tmp].forceY = atom_getfloatarg(2, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1138,10 +1138,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_atom toout[3]; toget = atom_getsymbolarg(0, argc, argv); - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -1150,7 +1150,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1164,7 +1164,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argc == 1) ) + if ( (toget == gensym("massesPos")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1175,10 +1175,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -1187,7 +1187,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1201,7 +1201,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argc == 1) ) + if ( (toget == gensym("massesPosName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1212,10 +1212,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -1224,7 +1224,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1238,7 +1238,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argc == 1) ) + if ( (toget == gensym("massesSpeeds")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1249,10 +1249,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -1261,7 +1261,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1275,7 +1275,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argc == 1) ) + if ( (toget == gensym("massesSpeedsName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1286,10 +1286,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -1298,7 +1298,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1312,7 +1312,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argc == 1) ) + if ( (toget == gensym("massesForces")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1323,10 +1323,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -1335,7 +1335,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1349,7 +1349,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argc == 1) ) + if ( (toget == gensym("massesForcesName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1360,10 +1360,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -1374,7 +1374,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -1390,7 +1390,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argc == 1) ) + if ( (toget == gensym("linksPos")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -1403,10 +1403,10 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -1417,7 +1417,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -1433,7 +1433,7 @@ void pmpd2d_get(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argc == 1) ) + if ( (toget == gensym("linksPosName")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -1491,7 +1491,7 @@ void pmpd2d_massesPosXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1510,7 +1510,7 @@ void pmpd2d_massesPosXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1521,7 +1521,7 @@ void pmpd2d_massesPosXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1541,7 +1541,7 @@ void pmpd2d_massesSpeedsXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1560,7 +1560,7 @@ void pmpd2d_massesSpeedsXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1571,7 +1571,7 @@ void pmpd2d_massesSpeedsXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1591,7 +1591,7 @@ void pmpd2d_massesForcesXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1610,7 +1610,7 @@ void pmpd2d_massesForcesXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1621,7 +1621,7 @@ void pmpd2d_massesForcesXT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1677,7 +1677,7 @@ void pmpd2d_massesPosYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1696,7 +1696,7 @@ void pmpd2d_massesPosYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1707,7 +1707,7 @@ void pmpd2d_massesPosYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1727,7 +1727,7 @@ void pmpd2d_massesSpeedsYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1746,7 +1746,7 @@ void pmpd2d_massesSpeedsYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1757,7 +1757,7 @@ void pmpd2d_massesSpeedsYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1777,7 +1777,7 @@ void pmpd2d_massesForcesYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1796,7 +1796,7 @@ void pmpd2d_massesForcesYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1807,7 +1807,7 @@ void pmpd2d_massesForcesYT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1866,7 +1866,7 @@ void pmpd2d_massesPosT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1886,7 +1886,7 @@ void pmpd2d_massesPosT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1897,7 +1897,7 @@ void pmpd2d_massesPosT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-1) & (j < x->nb_mass)) + while ((i < vecsize-1) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1919,7 +1919,7 @@ void pmpd2d_massesSpeedsT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1939,7 +1939,7 @@ void pmpd2d_massesSpeedsT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1950,7 +1950,7 @@ void pmpd2d_massesSpeedsT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-1) & (j < x->nb_mass)) + while ((i < vecsize-1) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1972,7 +1972,7 @@ void pmpd2d_massesForcesT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1992,7 +1992,7 @@ void pmpd2d_massesForcesT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2003,7 +2003,7 @@ void pmpd2d_massesForcesT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-1) & (j < x->nb_mass)) + while ((i < vecsize-1) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2061,7 +2061,7 @@ void pmpd2d_massesPosNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2080,7 +2080,7 @@ void pmpd2d_massesPosNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2091,7 +2091,7 @@ void pmpd2d_massesPosNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2111,7 +2111,7 @@ void pmpd2d_massesSpeedsNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2130,7 +2130,7 @@ void pmpd2d_massesSpeedsNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2141,7 +2141,7 @@ void pmpd2d_massesSpeedsNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2161,7 +2161,7 @@ void pmpd2d_massesForcesNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2180,7 +2180,7 @@ void pmpd2d_massesForcesNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2191,7 +2191,7 @@ void pmpd2d_massesForcesNormT(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2216,7 +2216,7 @@ void pmpd2d_massesPosMean(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2266,7 +2266,7 @@ void pmpd2d_massesPosStd(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2333,7 +2333,7 @@ void pmpd2d_massesForcesMean(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2383,7 +2383,7 @@ void pmpd2d_massesForcesStd(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2450,7 +2450,7 @@ void pmpd2d_massesSpeedsMean(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2500,7 +2500,7 @@ void pmpd2d_massesSpeedsStd(t_pmpd2d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { diff --git a/pmpd3d.c b/pmpd3d.c index 51e668a..644eafa 100644 --- a/pmpd3d.c +++ b/pmpd3d.c @@ -215,7 +215,7 @@ void pmpd3d_bang(t_pmpd3d *x) Lz = x->link[i].mass1->posZ - x->link[i].mass2->posZ; L = sqrt( sqr(Lx) + sqr(Ly) + sqr(Lz) ); - if ( (L >= x->link[i].Lmin) & (L < x->link[i].Lmax) & (L != 0)) + if ( (L >= x->link[i].Lmin) && (L < x->link[i].Lmax) && (L != 0)) { if (x->link[i].lType == 2) { // K et D viennent d'une table @@ -278,7 +278,7 @@ void pmpd3d_mass(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv)//, t_symbol * void pmpd3d_create_link(t_pmpd3d *x, t_symbol *Id, int mass1, int mass2, t_float K, t_float D, t_float Pow, t_float Lmin, t_float Lmax, t_int type) { // create a link based on mass number - if ((x->nb_mass>1) & (mass1 != mass2) & (mass1 >= 0) & (mass2 >= 0) & (mass1 < x->nb_mass) & (mass2 < x->nb_mass) ) + if ((x->nb_mass>1) && (mass1 != mass2) && (mass1 >= 0) && (mass2 >= 0) && (mass1 < x->nb_mass) && (mass2 < x->nb_mass) ) { x->link[x->nb_link].lType = type; x->link[x->nb_link].Id = Id; @@ -315,12 +315,12 @@ void pmpd3d_link(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) if (argc > 7) Lmax = atom_getfloatarg(7, argc, argv); // post("%d,%d, %f,%f", mass1, mass2, K, D); - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd3d_create_link(x, Id, mass1, mass2, K, D, Pow, Lmin, Lmax, 0); } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -331,7 +331,7 @@ void pmpd3d_link(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -342,7 +342,7 @@ void pmpd3d_link(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -380,14 +380,14 @@ void pmpd3d_tLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_float Lmax = 1000000; if (argc > 9) Lmax = atom_getfloatarg(7, argc, argv); - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd3d_create_link(x, Id, mass1, mass2, K, D, Pow, Lmin, Lmax, 1); x->link[x->nb_link-1].VX = vecteurX; x->link[x->nb_link-1].VY = vecteurY; } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -400,7 +400,7 @@ void pmpd3d_tLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -413,7 +413,7 @@ void pmpd3d_tLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -447,7 +447,7 @@ void pmpd3d_tabLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_float Dl = atom_getfloatarg(6, argc, argv); if (Dl <= 0) Dl = 1; - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) ) { pmpd3d_create_link(x, Id, mass1, mass2, 1, 1, 1, 0, 1000000, 2); x->link[x->nb_link-1].arrayK = arrayK; @@ -456,7 +456,7 @@ void pmpd3d_tabLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->link[x->nb_link-1].D_L = Dl; } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_FLOAT ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -471,7 +471,7 @@ void pmpd3d_tabLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -486,7 +486,7 @@ void pmpd3d_tabLink(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( ( argv[1].a_type == A_SYMBOL ) & ( argv[2].a_type == A_SYMBOL ) ) + if ( ( argv[1].a_type == A_SYMBOL ) && ( argv[2].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -513,13 +513,13 @@ void pmpd3d_setK(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -535,13 +535,13 @@ void pmpd3d_setD(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -557,13 +557,13 @@ void pmpd3d_setL(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -573,13 +573,13 @@ void pmpd3d_setL(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].L = x->link[tmp].mass2->posX - x->link[tmp].mass1->posX; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argc == 1 ) ) { for (i=0; i< x->nb_link; i++) { @@ -596,13 +596,13 @@ void pmpd3d_setLKTab(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float K_l = atom_getfloatarg(1, argc, argv); if (K_l <= 0) K_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].K_L = K_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -619,13 +619,13 @@ void pmpd3d_setLDTab(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) int tmp, i; t_float D_l = atom_getfloatarg(1, argc, argv); if (D_l <= 0) D_l = 1; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].D_L = D_l; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_link; i++) { @@ -641,13 +641,13 @@ void pmpd3d_setLinkId(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_link-1, tmp)); x->link[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_link; i++) { @@ -663,13 +663,13 @@ void pmpd3d_setMassId(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_SYMBOL ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].Id = atom_getsymbolarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_SYMBOL ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_SYMBOL ) ) { for (i=0; i< x->nb_mass; i++) { @@ -686,13 +686,13 @@ void pmpd3d_forceX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -709,13 +709,13 @@ void pmpd3d_forceY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceY += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -732,13 +732,13 @@ void pmpd3d_forceZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceZ += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -755,7 +755,7 @@ void pmpd3d_force(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // add a force to a specific mass int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -763,7 +763,7 @@ void pmpd3d_force(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceY += atom_getfloatarg(2, argc, argv); x->mass[tmp].forceZ += atom_getfloatarg(3, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -782,7 +782,7 @@ void pmpd3d_posX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -791,7 +791,7 @@ void pmpd3d_posX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceX = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -811,7 +811,7 @@ void pmpd3d_posY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -820,7 +820,7 @@ void pmpd3d_posY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceY = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -839,7 +839,7 @@ void pmpd3d_posZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -848,7 +848,7 @@ void pmpd3d_posZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceZ = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -867,7 +867,7 @@ void pmpd3d_pos(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) // displace a mass to a certain position int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -881,7 +881,7 @@ void pmpd3d_pos(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].speedZ = 0; x->mass[tmp].forceZ = 0; } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -993,13 +993,13 @@ void pmpd3d_setD2(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].D2 = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1009,7 +1009,7 @@ void pmpd3d_setD2(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } } - if ( ( argv[0].a_type == A_FLOAT ) & ( argc == 1 ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argc == 1 ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1022,13 +1022,13 @@ void pmpd3d_setSpeedX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1044,13 +1044,13 @@ void pmpd3d_setSpeedY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedY = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1066,13 +1066,13 @@ void pmpd3d_setSpeedZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].speedZ = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1088,7 +1088,7 @@ void pmpd3d_setSpeed(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -1096,7 +1096,7 @@ void pmpd3d_setSpeed(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].speedY = atom_getfloatarg(2, argc, argv); x->mass[tmp].speedZ = atom_getfloatarg(3, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1114,13 +1114,13 @@ void pmpd3d_addPosX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posX += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1136,13 +1136,13 @@ void pmpd3d_addPosY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posY += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1158,13 +1158,13 @@ void pmpd3d_addPosZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].posZ += atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1180,7 +1180,7 @@ void pmpd3d_addPos(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -1188,7 +1188,7 @@ void pmpd3d_addPos(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].posY += atom_getfloatarg(2, argc, argv); x->mass[tmp].posZ += atom_getfloatarg(3, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1206,13 +1206,13 @@ void pmpd3d_setForceX(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceX = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1228,13 +1228,13 @@ void pmpd3d_setForceY(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceY = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1250,13 +1250,13 @@ void pmpd3d_setForceZ(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); x->mass[tmp].forceZ = atom_getfloatarg(1, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1272,7 +1272,7 @@ void pmpd3d_setForce(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { int tmp, i; - if ( ( argv[0].a_type == A_FLOAT ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { tmp = atom_getfloatarg(0, argc, argv); tmp = max(0, min( x->nb_mass-1, tmp)); @@ -1280,7 +1280,7 @@ void pmpd3d_setForce(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) x->mass[tmp].forceY = atom_getfloatarg(2, argc, argv); x->mass[tmp].forceZ = atom_getfloatarg(3, argc, argv); } - if ( ( argv[0].a_type == A_SYMBOL ) & ( argv[1].a_type == A_FLOAT ) & ( argv[2].a_type == A_FLOAT ) & ( argv[3].a_type == A_FLOAT ) ) + if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) && ( argv[2].a_type == A_FLOAT ) && ( argv[3].a_type == A_FLOAT ) ) { for (i=0; i< x->nb_mass; i++) { @@ -1301,10 +1301,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_atom toout[4]; toget = atom_getsymbolarg(0, argc, argv); - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -1314,7 +1314,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1329,7 +1329,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPos")) & (argc == 1) ) + if ( (toget == gensym("massesPos")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1341,10 +1341,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].posX); @@ -1354,7 +1354,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1369,7 +1369,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesPosName")) & (argc == 1) ) + if ( (toget == gensym("massesPosName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1381,10 +1381,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -1394,7 +1394,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeeds")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1409,7 +1409,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeeds")) & (argc == 1) ) + if ( (toget == gensym("massesSpeeds")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1421,10 +1421,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].speedX); @@ -1434,7 +1434,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesSpeedsName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1449,7 +1449,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesSpeedsName")) & (argc == 1) ) + if ( (toget == gensym("massesSpeedsName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1461,10 +1461,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -1474,7 +1474,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForces")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1489,7 +1489,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForces")) & (argc == 1) ) + if ( (toget == gensym("massesForces")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1501,10 +1501,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETSYMBOL(&(toout[0]), x->mass[i].Id); SETFLOAT(&(toout[1]), x->mass[i].forceX); @@ -1514,7 +1514,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("massesForcesName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -1529,7 +1529,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("massesForcesName")) & (argc == 1) ) + if ( (toget == gensym("massesForcesName")) && (argc == 1) ) { for (i=0; i< x->nb_mass; i++) { @@ -1541,10 +1541,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -1557,7 +1557,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPos")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -1575,7 +1575,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPos")) & (argc == 1) ) + if ( (toget == gensym("linksPos")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -1590,10 +1590,10 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_FLOAT) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_FLOAT) ) { i = atom_getfloatarg(1, argc, argv); - if ( (i>=0) & (inb_mass) ) + if ( (i>=0) && (inb_mass) ) { SETFLOAT(&(toout[0]), i); SETFLOAT(&(toout[1]), x->link[i].mass1->posX); @@ -1606,7 +1606,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argv[1].a_type == A_SYMBOL) ) + if ( (toget == gensym("linksPosName")) && (argv[1].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_link; i++) { @@ -1624,7 +1624,7 @@ void pmpd3d_get(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (toget == gensym("linksPosName")) & (argc == 1) ) + if ( (toget == gensym("linksPosName")) && (argc == 1) ) { for (i=0; i< x->nb_link; i++) { @@ -1684,7 +1684,7 @@ void pmpd3d_massesPosXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1703,7 +1703,7 @@ void pmpd3d_massesPosXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1714,7 +1714,7 @@ void pmpd3d_massesPosXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1734,7 +1734,7 @@ void pmpd3d_massesSpeedsXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1753,7 +1753,7 @@ void pmpd3d_massesSpeedsXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1764,7 +1764,7 @@ void pmpd3d_massesSpeedsXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1784,7 +1784,7 @@ void pmpd3d_massesForcesXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1803,7 +1803,7 @@ void pmpd3d_massesForcesXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1814,7 +1814,7 @@ void pmpd3d_massesForcesXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1870,7 +1870,7 @@ void pmpd3d_massesPosYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1889,7 +1889,7 @@ void pmpd3d_massesPosYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1900,7 +1900,7 @@ void pmpd3d_massesPosYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1920,7 +1920,7 @@ void pmpd3d_massesSpeedsYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1939,7 +1939,7 @@ void pmpd3d_massesSpeedsYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1950,7 +1950,7 @@ void pmpd3d_massesSpeedsYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -1970,7 +1970,7 @@ void pmpd3d_massesForcesYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -1989,7 +1989,7 @@ void pmpd3d_massesForcesYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2000,7 +2000,7 @@ void pmpd3d_massesForcesYT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2056,7 +2056,7 @@ void pmpd3d_massesPosZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2075,7 +2075,7 @@ void pmpd3d_massesPosZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2086,7 +2086,7 @@ void pmpd3d_massesPosZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2106,7 +2106,7 @@ void pmpd3d_massesSpeedsZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2125,7 +2125,7 @@ void pmpd3d_massesSpeedsZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2136,7 +2136,7 @@ void pmpd3d_massesSpeedsZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2156,7 +2156,7 @@ void pmpd3d_massesForcesZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2175,7 +2175,7 @@ void pmpd3d_massesForcesZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2186,7 +2186,7 @@ void pmpd3d_massesForcesZT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2248,7 +2248,7 @@ void pmpd3d_massesPosT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2269,7 +2269,7 @@ void pmpd3d_massesPosT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2280,7 +2280,7 @@ void pmpd3d_massesPosT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-2) & (j < x->nb_mass)) + while ((i < vecsize-2) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2304,7 +2304,7 @@ void pmpd3d_massesSpeedsT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2325,7 +2325,7 @@ void pmpd3d_massesSpeedsT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2336,7 +2336,7 @@ void pmpd3d_massesSpeedsT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-2) & (j < x->nb_mass)) + while ((i < vecsize-2) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2360,7 +2360,7 @@ void pmpd3d_massesForcesT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2381,7 +2381,7 @@ void pmpd3d_massesForcesT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2392,7 +2392,7 @@ void pmpd3d_massesForcesT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize-2) & (j < x->nb_mass)) + while ((i < vecsize-2) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2452,7 +2452,7 @@ void pmpd3d_massesPosNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2471,7 +2471,7 @@ void pmpd3d_massesPosNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2482,7 +2482,7 @@ void pmpd3d_massesPosNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2502,7 +2502,7 @@ void pmpd3d_massesSpeedsNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2521,7 +2521,7 @@ void pmpd3d_massesSpeedsNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2532,7 +2532,7 @@ void pmpd3d_massesSpeedsNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2552,7 +2552,7 @@ void pmpd3d_massesForcesNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) t_garray *a; t_word *vec; - if ( (argc==1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc==1) && (argv[0].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2571,7 +2571,7 @@ void pmpd3d_massesForcesNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } } else - if ( (argc==2) & (argv[0].a_type == A_SYMBOL) & (argv[1].a_type == A_SYMBOL) ) + if ( (argc==2) && (argv[0].a_type == A_SYMBOL) && (argv[1].a_type == A_SYMBOL) ) { t_symbol *tab_name = atom_getsymbolarg(0, argc, argv); if (!(a = (t_garray *)pd_findbyclass(tab_name, garray_class))) @@ -2582,7 +2582,7 @@ void pmpd3d_massesForcesNormT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) { i = 0; j = 0; - while ((i < vecsize) & (j < x->nb_mass)) + while ((i < vecsize) && (j < x->nb_mass)) { if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id) { @@ -2608,7 +2608,7 @@ void pmpd3d_massesPosMean(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2664,7 +2664,7 @@ void pmpd3d_massesPosStd(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2740,7 +2740,7 @@ void pmpd3d_massesForcesMean(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2796,7 +2796,7 @@ void pmpd3d_massesForcesStd(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2872,7 +2872,7 @@ void pmpd3d_massesSpeedsMean(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) somme = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { @@ -2928,7 +2928,7 @@ void pmpd3d_massesSpeedsStd(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) std = 0; j = 0; - if ( (argc >= 1) & (argv[0].a_type == A_SYMBOL) ) + if ( (argc >= 1) && (argv[0].a_type == A_SYMBOL) ) { for (i=0; i< x->nb_mass; i++) { -- cgit v1.2.1