Difference between revisions of "Slow the turtle down"

From JSXGraph Wiki
Jump to navigationJump to search
Line 7: Line 7:
  
 
function run(n) {
 
function run(n) {
   if (n>=0) {
+
   if (n>0) {
 
     t.fd(20);
 
     t.fd(20);
     t.lt(12);
+
     t.lt(12*n/100);
 
     var st = 'run(' + (n-1) + ')';
 
     var st = 'run(' + (n-1) + ')';
 
     setTimeout(st,50);
 
     setTimeout(st,50);

Revision as of 16:16, 25 February 2009