Using abs will return the absolute value of a number
abs
-300.abs # 300300.abs # 300
Put a negative sign in front of it.
>> --300=> 300>> x = -300=> -300>> -x=> 300
Wouldn't it just be easier to multiply it by negative one?
x * -1
That way you can go back and forth.