Hello all,
How do I convert a negative float to a positive float?
Cheers,
Manny
Hello all,
How do I convert a negative float to a positive float?
Cheers,
Manny
* -1.0 ? Or possibly fabs() depending upon what it is you are actually trying to do.
Great.... *-1 does the trick.Originally Posted by SKeane
ta.
Why not just use the unary - operator instead? Multiplying by -1 in programming is an artifact of mathematics in my eyes.