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

#1 2011-03-23 14:17:05

bobbydooda
Scratcher
Registered: 2011-01-23
Posts: 12

operators the little green thingys

((  <mod>  ))<round( <abs(  ive got no idea what these do so please help scratch wiki isn't very clear

Offline

 

#2 2011-03-23 14:32:40

scratcher7_13
Scratcher
Registered: 2011-02-09
Posts: 1000+

Re: operators the little green thingys

Abs=absolute value operator (look it up)
Round=Rounds a decimal to the nearest whole number
Mod=Modulo operator (look it up)


♫ 90% of teens can't do math. If you are one of the 40% of teens who can, copy and paste this into your signature. ♫♪
http://dl.dropbox.com/u/6273449/BlockLibraryTitle.pnghttp://i.imgur.com/mr9Hf.gif

Offline

 

#3 2011-03-23 14:33:06

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: operators the little green thingys

[blocks]((  <mod>  ))[/blocks] returns the remainder you get when you divide the first number by the second number.
[blocks]<round( [/blocks] returns the number rounded up.
[blocks]<abs( [/blocks] returns the absolute value of the number. This means that if the number is negative, it returns the positive form of the number, and just returns the number if it's positive.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#4 2011-03-23 16:12:27

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: operators the little green thingys

bobbydooda wrote:

[blocks]((  <mod>  ))<round( <abs([/blocks]  ive got no idea what these do so please help scratch wiki isn't very clear

If you're using the forum blocks it's a good idea to put [blocks][/blocks] around them to stop the rest of your post going bold.  wink

Last edited by TheSuccessor (2011-03-23 16:12:43)


/* No comment */

Offline

 

#5 2011-04-03 00:15:11

Funky7774
Scratcher
Registered: 2010-10-16
Posts: 18

Re: operators the little green thingys

[block]<abs( )[/block]  I have no clue either.


"The stars say you're an exciting and wonderful person, but you know they're lying."     Your Horoscope For Today by "Weird Al" Yankovic

Offline

 

#6 2011-04-03 00:39:07

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: operators the little green thingys

Funky7774 wrote:

[block]<abs( )[/block]  I have no clue either.

abs() returns the absolute value of a number. It's essentially the number's distance from 0; abs(17) is 17, and abs(-17) is also 17.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer