diff options
-rw-r--r-- | pmpd~.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -163,7 +163,7 @@ t_int *pmpd_tilde_perform(t_int *w) // compute forces generated by NLlinks (spring / dashpot)
{
L=x->NLlink[i].mass1->posX - x->NLlink[i].mass2->posX - x->NLlink[i].L0;
- if (L<x->NLlink[i].Lmax & L>x->NLlink[i].Lmin)
+ if ((L < x->NLlink[i].Lmax) && (L > x->NLlink[i].Lmin))
{
F = x->NLlink[i].K1 * pow(fabs(L) ,x->NLlink[i].Pow) ;
if (L < 0) F *= -1;
|