[Coco] Simple value inersion in Color Basic

William Astle lost at l-w.ca
Tue Jan 20 15:17:22 EST 2015


You don't even need to multiply in this case. You can use "unary negation":

A = -A


On 15-01-20 01:14 PM, Brendan Donahe wrote:
> Multiply by -1?  (Surely I must be missing something...)
>
> Brendan
>
> On Tue, Jan 20, 2015 at 2:08 PM, Nick Marentes <nickma2 at optusnet.com.au>
> wrote:
>
>> Can anyone tell me a really simple way to "invert" the value in a variable
>> between 2 numbers?
>>
>> Let's say the variable is in A and I want to toggle the value between 1
>> and -1.
>>
>> Color Basic lacks many of the commands I'm use to but there must be an
>> easy "mathematical" way to do this.
>>
>> Nick
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>>
>



More information about the Coco mailing list