From d23606cba1c9094706ce978b72398efa80ac2208 Mon Sep 17 00:00:00 2001 From: Cyrille Henry Date: Wed, 16 Jan 2013 14:57:52 +0000 Subject: remove adaptLength to be replace by setL Id curent % (flaot) svn path=/trunk/externals/pmpd/; revision=16880 --- pmpd3d_various.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'pmpd3d_various.c') diff --git a/pmpd3d_various.c b/pmpd3d_various.c index 0c94161..060f2d3 100644 --- a/pmpd3d_various.c +++ b/pmpd3d_various.c @@ -1,22 +1,3 @@ -t_float tabread(t_pmpd3d *x, t_int n, t_symbol *array) -{ - t_garray *a; - int npoints; - t_word *vec; - - if (!(a = (t_garray *)pd_findbyclass(array, garray_class))) - pd_error(x, "%s: no such array", array->s_name); - else if (!garray_getfloatwords(a, &npoints, &vec)) - pd_error(x, "%s: bad template for tabLink", array->s_name); - else - { - if (n >= npoints - 1) - return (0); - return ( vec[n].w_float); - } - return(0); -} - void pmpd3d_infosL(t_pmpd3d *x) { t_int i; @@ -496,28 +477,6 @@ void pmpd3d_closestMass(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) } -void pmpd3d_adaptLength(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) -{ - t_int i; - - if ( ( argv[0].a_type == A_FLOAT ) && ( argv[1].a_type == A_FLOAT ) ) - { - i = atom_getfloatarg(0, argc, argv); - i = max(0, min( x->nb_link-1, i)); - x->link[i].L = mix(x->link[i].L,x->link[i].distance,atom_getfloatarg(1, argc, argv)); - } - if ( ( argv[0].a_type == A_SYMBOL ) && ( argv[1].a_type == A_FLOAT ) ) - { - for (i=0; i< x->nb_link; i++) - { - if ( atom_getsymbolarg(0,argc,argv) == x->link[i].Id) - { - x->link[i].L = mix(x->link[i].L,x->link[i].distance,atom_getfloatarg(1, argc, argv)); - } - } - } -} - void pmpd3d_massesDistances_f_f(t_pmpd3d *x, t_int i, t_int j) { t_float dist, tmp; -- cgit v1.2.1