[OpenSCAD] Function to return the Opposite value
leebc11 at acm.org
Thu Oct 31 14:16:09 EDT 2019
Thanks for the replies guys!
> notThing = ( (isThing == 0) ? 1 : 0);
Unfortunately, this produces a booleen.
Brilliant! I knew there had to be an easy math way to do it.
> oppositeThing = 1-isThing;
> I sometimes also use this as a dirty way of enabling or disable whole chunks
> of code, by putting it within a scale fubction
Still brilliant. That's what I plan on doing with it, enable and disable
chunks of translation code. ;-)
More information about the Discuss