Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: <MWcybercourse@xxxxxxxxxxxxxxx>
Subject: Re: Dolls - recursion
From: "mike sandy" <mjsandy@xxxx>
Date: Wed, 19 Dec 2001 21:59:12 -0000

I wrote:
>>If 'speed' is a slider min: 1, max: 100 then:

to travel :dist 
let[spd speed * .01]
repeat (abs :dist) / :spd
[fd :spd]
end

>>should correct the problem. Then constant (.01) can be change
>>to suit the situation.

A more flexible general proc to replace glide is:

to travel :dist 
let[sgn :dist / abs :dist
spd :sgn * speed * .01]
repeat :dist / :spd[fd :spd]
end

which will now cope with negative distances.
Mike



  • Previous by thread: Re: Dolls - recursion
  • Next by thread: Re: Re: Dolls - recursion

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008