[OpenSCAD] Function to return the Opposite value

Bryan Lee leebc11 at acm.org
Thu Oct 31 03:18:27 EDT 2019

I want to define a value at the top of my program:

	isThing=1;  // isThing can be 0 or 1

But later on I need to be able to use the opposite value.  
	1 if isThing==0 or
	0 if isThing==1

Note that this needs to be a number, not a boolean because I will be
multiplying vectors by it.

I am happy with either defining a variable or using a function to get this
opposite value.

How can I do this?

More information about the Discuss mailing list