Hey! I'm not exactly new, but I need help. I want a block that will convert negitive variables, to positive variables. I know there is one, but I just don't know which one it is.
Offline
What you want is the abs block. It is a function in the math block.
Offline
archmage wrote:
What you want is the abs block. It is a function in the math block.
Thanks! Also, do you know how to make positive negative? I tried all the functions.
Offline
if (number>0){
number= number*-1
}
Offline
archmage wrote:
if (number>0){
number= number*-1
}
Yeah... I was thinking something different. Thanks!
Offline
archmage wrote:
if (number>0){
number= number*-1
}
Or:
[blocks]<if><( <{ number }> <>> 0 )>
<set{ <{ number }> }to( (( 0 <-> <{ number }> ))
<end>[/blocks]
Both will work
Offline
coolstuff wrote:
Or if you just want to turn a positive to a negative and a negative to a positive, multiply it by negative 1.
Nice idea! I didn't think of that! ^^
Indeed, both Archmage's and my codes will work for positive as well as negative numbers.
Offline
Gosh, I hope negative numbers work for you. They hate me, and so they confuse my program.
Say, can someone tell me the function of each math function?
Offline