Discuss Scratch

awesomelilbuddy
Scratcher
55 posts

How do I do this?

How do I calculate the difference between a number? example: The difference between 1 and 2 is: 1. (Note: I want a clean solution, with only math blocks if possible.)
EpicGhoul993
Scratcher
1000+ posts

How do I do this?

(() - ()) //???????
legendary34678
Scratcher
1000+ posts

How do I do this?

I think what you are looking for is the absolute value of two numbers. You can find the absolute value block in Operators where there is a block called “abs of”.

([abs v] of ((1) - (2))::operators) // results in 1
([abs v] of ((2) - (1))::operators) // also results in 1

Powered by DjangoBB