ejk@ux1.cso.uiuc.edu (Ed Kubaitis) (09/28/89)
The attached patch fixes a problem introduced getting xfroot ready to post to comp.sources.x last weekend. The problem caused the sign of user-supplied fractal parameters to be randomly changed. *** xfroot.c.orig Sat Sep 23 11:14:26 1989 --- xfroot.c Mon Sep 25 08:12:48 1989 *************** *** 90,98 hopset() { int r = Ranfseed; double pmax=1.0*W, logpmax=log(pmax); ! A = (A) ? A : exp(Ranf()*logpmax); if (r&2) A = -A; ! B = (B) ? B : exp(Ranf()*logpmax); if (r&4) B = -B; ! C = (C) ? C : Ranf()*pmax; if (r&8) C = -C; } --- 90,98 ----- hopset() { int r = Ranfseed; double pmax=1.0*W, logpmax=log(pmax); ! if (!A) { A = exp(Ranf()*logpmax); if (r&2) A = -A; } ! if (!B) { B = exp(Ranf()*logpmax); if (r&4) B = -B; } ! if (!C) { C = Ranf()*pmax; if (r&8) C = -C; } }