aboutsummaryrefslogtreecommitdiff
path: root/henon.c
diff options
context:
space:
mode:
authorB. Bogart <bbogart@users.sourceforge.net>2002-09-16 16:36:20 +0000
committerB. Bogart <bbogart@users.sourceforge.net>2002-09-16 16:36:20 +0000
commit2c7657c48db74de5a512c55165df80b877b38d33 (patch)
tree14bc0e281a0a4d2014abde3adf91145364dd147e /henon.c
parent9c772b63840098d6bc66ca5fd03d25cbcc8646bf (diff)
Added arguments to "reset" method, allows reseting to particular initial conditions.
svn path=/trunk/externals/bbogart/chaos/; revision=128
Diffstat (limited to 'henon.c')
-rw-r--r--henon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/henon.c b/henon.c
index 54cf4e2..a67addd 100644
--- a/henon.c
+++ b/henon.c
@@ -53,10 +53,10 @@ static void calculate(henon_struct *x)
outlet_float(x->y_outlet, (t_float)ly1);
}
-static void reset(henon_struct *x)
+static void reset(henon_struct *x, t_floatarg lx0, t_floatarg ly0)
{
- x->lx0 = 1;
- x->ly0 = 1;
+ x->lx0 = lx0;
+ x->ly0 = ly0;
}
static void param(henon_struct *x, t_floatarg a, t_floatarg b)
@@ -96,6 +96,8 @@ void henon_setup(void)
class_addmethod(henon_class,
(t_method)reset,
gensym("reset"),
+ A_DEFFLOAT,
+ A_DEFFLOAT,
0);
class_addmethod(henon_class,