This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-02-12 16:11:56

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

Simple formula needed to be found!

I need a formula which can change any number to any factor of 10.
Thanks.


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

#2 2011-02-12 16:26:39

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: Simple formula needed to be found!

What do you mean, 'change any number to a factor of 10'?

The factors of 10 are 1, 2, 5 and 10. Do you mean 'multiple'?

Do you mean round it to the nearest 10, or truncate it (always rounding down)?

Or do you mean multiply it by a number to get a multiple of 10?

Also, give some context. What is it you need the formula for?

Last edited by floppy_gunk (2011-02-12 16:29:55)


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#3 2011-02-12 16:30:40

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

Re: Simple formula needed to be found!

I mean like rounding a variable which changes into the nearest 10 or 100


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

#4 2011-02-12 16:34:53

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

Re: Simple formula needed to be found!

Without using variables or more then 1 if I am making a speedometre, using scripts like if letter of speed of speed>Round and that stuff

Last edited by arthurz (2011-02-12 16:37:19)


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

#5 2011-02-12 16:42:47

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Simple formula needed to be found!

Here:
http://i52.tinypic.com/2nh16xy.gif
Replace number with the number or variable you want.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#6 2011-02-12 16:45:46

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

Re: Simple formula needed to be found!

wow, thanks Kileymeister thanks for the help!


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

Board footer