I am doing some programming with math. I have written a tidy function which turns any positive number to negative or any negative number to a positive.
I would like to name this function in the most informative way so that if someone else were to look at my function; they would understand, straight away, what it does (and expect what it says on the tin).
The best word I can come up with is 'flip' but I feel that it fails at being obvious.
The function belongs to the Math object so it looks like this:
answer = Math.flip(number)
The results might be
-1 = Math.flip(1)
or
1 = Math.flip(-1)
How can I best describe this act?