[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Negative number positive



abs(-5)

On Dec 26, 2006, at 7:00 PM, Farai Aschwanden wrote:

Hello

Erm, not a Pygame 1.8 question but just cant find the the needed function: I would like to make a negative number to a positive number, like -5 -> 5

Quite easy, just cant find the Python function (if there is one). Sure I could multiply the negative value by -1 but I would prefer using the convention function. Is there one and what is it called?

Thanks in advance
Farai