Do you mean ABS? That stands for Anti-lock Brakes, but I'm pretty sure that's not what you mean. Let me check if there's a trig function in Scratch or something called abs
Ah, there is. Check out this Wiki article.
http://wiki.scratch.mit.edu/wiki/()_of_ … ock)#abs_2
Offline
As noted above, it stands for "absolute value". It is basically the distance a number is from zero. Another way to think of it is that the absolute value of a number is the positive value of that number.
abs of -4 = 4
abs of 4 = 4
abs of 0 = 0
abs of 0.35 = 0.35
abs of -0.35 = 0.35
Edit: oops, just realized how similar to wiki that post sounds xD
Last edited by MoreGamesNow (2012-05-19 18:28:56)
Offline
Basically, using
[abs v] of (number)is a more effective way of writing
if <(number) < [0]> set [number v] to ((number)*[-1])
Offline