aboutsummaryrefslogtreecommitdiff
path: root/pmpd3d_set.c
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2013-05-01 15:49:53 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2013-05-01 15:49:53 +0000
commit515722a58656d57343b78eedb6a74e1e87830058 (patch)
tree00ab388df9de12c2365c18c9fbcf8f4803dbd099 /pmpd3d_set.c
parent563967c7bb1b1b4eb0c09b757c4b2595d3aab97c (diff)
bugfix : distance in setLcurrent (float) was not correctly computed
svn path=/trunk/externals/pmpd/; revision=17106
Diffstat (limited to 'pmpd3d_set.c')
-rw-r--r--pmpd3d_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pmpd3d_set.c b/pmpd3d_set.c
index 19b8540..7592e45 100644
--- a/pmpd3d_set.c
+++ b/pmpd3d_set.c
@@ -146,7 +146,7 @@ void pmpd3d_setLCurrent(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv)
{ // set a link to it's current length
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;
+ x->link[tmp].L = x->link[i].distance;
}
else if ( ( argc == 1 ) && ( argv[0].a_type == A_SYMBOL ) )
{ // set a class of link to there current length