I have a script that works:
1 | X = math.random(- 10 , 10 ) --this doesn't have to be math.random |
2 | if X < 0 then |
3 | X = X*- 1 |
4 | end |
5 | print (X) |
But I'm wondering if there is a better way, especially if I'm trying to get the absolute value of multiple numbers, possibly vector 3.
1 | math.abs() |