Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » What is the opposite of abs of block in scratch
- TECH_TRASH
-
6 posts
What is the opposite of abs of block in scratch
On one of my recent projects I used abs of block that worked when it the sprite faced 90 degrees when I tried to move it negative 90 degrees it didn't work I switched the order and even tried negative numbers
Last edited by TECH_TRASH (June 5, 2022 10:09:58)
- Jlerpy
-
1000+ posts
What is the opposite of abs of block in scratch
I'm unclear what you're trying to achieve.
- RT_Borg
-
1000+ posts
What is the opposite of abs of block in scratch
Hi TECH_TRASH,
abs (short for “absolute value”) takes a number and tells you how big the number is, without caring whether it's a negative number.
So abs (7) = 7.
and abs (-7) = 7.
It basically just strips off negative signs.
If you're looking to take a variable and make it the opposite (turn positive into negative, and negative into positive) the easiest way is:
or
Is that what you're looking for?
– RT_Borg
abs (short for “absolute value”) takes a number and tells you how big the number is, without caring whether it's a negative number.
So abs (7) = 7.
and abs (-7) = 7.
It basically just strips off negative signs.
If you're looking to take a variable and make it the opposite (turn positive into negative, and negative into positive) the easiest way is:
or
Is that what you're looking for?
– RT_Borg
- TECH_TRASH
-
6 posts
What is the opposite of abs of block in scratch
@RT_Borg and @idkhow2type
This really helped my project thanks
This really helped my project thanks
- elh201108
-
1 post
What is the opposite of abs of block in scratch
Is there a block that can switch both a positive to a negative and a negative to a positive?
Last edited by elh201108 (March 17, 2024 19:20:37)
- SpyCoderX
-
1000+ posts
What is the opposite of abs of block in scratch
That is the “abs of ()” block, but try not to Necropost on old posts. Thanks! Is there a block that can switch both a positive to a negative and a negative to a positive?
- Discussion Forums
- » Help with Scripts
-
» What is the opposite of abs of block in scratch