Hello all,

How do I convert a negative float to a positive float?

Cheers,

Manny

Printable View

- 10-19-2006mannyconvert negative float to positive ???
Hello all,

How do I convert a negative float to a positive float?

Cheers,

Manny - 10-19-2006SKeane
* -1.0 ? Or possibly fabs() depending upon what it is you are actually trying to do.

- 10-19-2006mannyQuote:

Originally Posted by**SKeane**

ta. - 10-19-2006OnionKnight
Why not just use the unary - operator instead? Multiplying by -1 in programming is an artifact of mathematics in my eyes.

- 07-02-2009lastsurvivor