Discuss Scratch

M_E___G_U_S_T_A
Scratcher
6 posts

What does the "abs" mean?

I just don't understand what the “abs” is in the block
absof9

mean. Can anybody help me please?
turkey3_test
Scratcher
1000+ posts

What does the "abs" mean?

That takes the absolute value of the number in the parameters. The absolute value of a number always makes it positive. So if you put in a -4, the block would report a positive 4. If you put in a positive 4, it still would report positive. The rest of the options in the drop-down are advanced mathematical operations.
M_E___G_U_S_T_A
Scratcher
6 posts

What does the "abs" mean?

??? I DON'T UNDERSTAND!!!!!! D:

D:
OrcaCat
Scratcher
1000+ posts

What does the "abs" mean?

It returns the positive form of the given number.
turkey3_test
Scratcher
1000+ posts

What does the "abs" mean?

M_E___G_U_S_T_A wrote:

??? I DON'T UNDERSTAND!!!!!! D:

D:
absof4=4absof-4=4
TheOatBaron
New Scratcher
41 posts

What does the "abs" mean?

ABS is the distance the number is from 0; it will always be positive. So abs (-9) = 9 and abs (9) = 9 because both of them are 9 away from 0.
M_E___G_U_S_T_A
Scratcher
6 posts

What does the "abs" mean?

hmm… I think I understand now… maybe?
TheOatBaron
New Scratcher
41 posts

What does the "abs" mean?

Maybe this article can explain it better than us http://www.purplemath.com/modules/absolute.htm

NOTE: | | is the sign for absolute value (abs)
triplehotdog
Scratcher
9 posts

What does the "abs" mean?

Now I understand abs. But why is it important in scratch? In what possibilities can you use it in?
deck26
Scratcher
1000+ posts

What does the "abs" mean?

triplehotdog wrote:

Now I understand abs. But why is it important in scratch? In what possibilities can you use it in?
A simple example - you want to know the difference in the x coordinates of two sprites.

setdifferencetoabsofX1-X2
is easier than
setdifferencetoX1-X2ifdifference<0 thensetdifferencetodifference*-1
PaganoLeo10
Scratcher
100+ posts

What does the "abs" mean?

If a negative number is put into the parameter, it's distance from 0 will be reported. Otherwise, the parameter will be reported.

Last edited by PaganoLeo10 (March 19, 2015 11:06:51)

bsmoa66
Scratcher
3 posts

What does the "abs" mean?

Im kindoff confused about this. All i know is -9 converts into 9 positive
:/:/#confused:)
Pxci
Scratcher
79 posts

What does the "abs" mean?

Please don't necropost.

Abs turns every negative number into positive.

-9001 = 9001.
EPICPIE03
Scratcher
6 posts

What does the "abs" mean?

whenSWAGkeypressed
Fruitbatty
Scratcher
49 posts

What does the "abs" mean?

ok, so look. the absolute value of… less say -a is equal to a. The absolute value of -a is a.
TheNonNameMouse
Scratcher
88 posts

What does the "abs" mean?

It's pretty much the number's distance from 0 on a number line
sparks
Forum Moderator
100+ posts

What does the "abs" mean?

This thread was brought back by necroposting and I think the original question was answered so I'm closing this.

Powered by DjangoBB