negative value <---> positive value
give a other way? as
Code:
a = -13Code:
a = 13 |
Re: negative value <---> positive value
what the hell is that?
a = -b b = -a |
Re: negative value <---> positive value
change -13 to 13 (negative value -> positive value)
change 13 to -13 (positive value -> negative value) or 145 to -145.... etc. don't find a native from amxx that do it. |
Re: negative value <---> positive value
I already told u,
b = -a; |
Re: negative value <---> positive value
dosen't understand, next mate please.
|
Re: negative value <---> positive value
or u can do
b *= -1 |
Re: negative value <---> positive value
Quote:
Code:
new a = 13; |
Re: negative value <---> positive value
Quote:
Code:
a = 5 ; b *= a => 0 |
Re: negative value <---> positive value
Quote:
a = 13 b = -a so b = -13 a = -13 b = -a so b = 13 |
Re: negative value <---> positive value
By multiplying the variable by -1, you should do what he wants. (negative value <---> positive value)
a = 6 If you want to have the negative value of a in the same variable, you can do a *= -1 a is -6 now. |
| All times are GMT -4. The time now is 08:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.