Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » What does the "abs" mean?
- 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
mean. Can anybody help me please?
([abs v] of (9))
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.
- 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?
??? I DON'T UNDERSTAND!!!!!! D:D:
<([abs v] of (4)) = [4]>
<([abs v] of (-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.
- 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)
http://www.purplemath.com/modules/absolute.htmNOTE: | | 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?
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.
set [difference v] to ([abs v] of ((X1) - (X2)))is easier than
set [difference v] to ((X1) - (X2))
if <(difference) < [0 ]> then
set [difference v] to ((difference) * (-1))
end
- 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.
Abs turns every negative number into positive.
-9001 = 9001.
- 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.
- Discussion Forums
- » Help with Scripts
-
» What does the "abs" mean?













