[SOLVED] Invert/mirror a number

I think i saw it once here but i did not save it
And now i can’t find how to do it and all i find is how to invert gravity or mirror animation
Imagine i have number variable with value 5 how do i invert it to -5?
My idea is to Variable-(Variable*2)

And that would work for negative i guess
Since it would be 5-(5*2=10) so it would be -5

But what if variable would be -5 and i want it to go for positive?
I mean is there some expression for it or formula to automate process?
OR i need to have separate events for positive and negative inversion?

Hi ZeroX4, I don’t know if I missed the point, but what if you multiply by -1?

 5 x -1 = -5
-5 x -1 =  5

You did not
Woks perfectly THX

1 Like