We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › positive int number
Page Index Toggle Pages: 1
positive int number (Read 1394 times)
positive int number
Feb 12th, 2010, 9:52am
 
hi all.

Who knows how to put a negative number in a positive? the are some code like negative(); or invert();?????


thanks
Re: positive int number
Reply #1 - Feb 12th, 2010, 10:12am
 
Oh yeah, Cedric's got it in the next post. Forget what I said. I wasn't reading what you were asking right.
Re: positive int number
Reply #2 - Feb 12th, 2010, 10:12am
 
just use abs()
Re: positive int number
Reply #3 - Feb 12th, 2010, 11:09am
 
or
your negative numbre * -1
Re: positive int number
Reply #4 - Feb 12th, 2010, 11:51am
 
a = -a;
Re: positive int number
Reply #5 - Feb 13th, 2010, 6:57am
 
ya. i think abs() resolve my problem. i want to know if was some other code to do that.

thanks all
Page Index Toggle Pages: 1