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

#1 2013-04-30 18:58:14

Kyle2Death
Scratcher
Registered: 2013-04-01
Posts: 19

Round to the Tenths

How can I make round block round to the nearest tenth?

Offline

 

#2 2013-04-30 20:05:39

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Round to the Tenths

Allow me to do an example for you.

We will use two variables:

1) Number - to hold the original number
2) RoundedNumber - to hold the answer

set [RoundedNumber v] to <<round <(Number)*[10]>>/[10]>

Last edited by Smozzick (2013-04-30 20:06:39)


http://i50.tinypic.com/ded8m.png

Offline

 

#3 2013-04-30 20:24:40

Kyle2Death
Scratcher
Registered: 2013-04-01
Posts: 19

Re: Round to the Tenths

Ok, thinks!

Offline

 

#4 2013-04-30 20:31:24

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Round to the Tenths

No problem, hope it helps.


http://i50.tinypic.com/ded8m.png

Offline

 

Board footer