[OpenSCAD] Function to return the Opposite value

Torsten Paul Torsten.Paul at gmx.de
Thu Oct 31 15:08:25 EDT 2019


On 31.10.19 19:16, Bryan Lee wrote:
> @MichaelAtOz
>>   notThing = ( (isThing == 0) ? 1 : 0);
>
> Unfortunately, this produces a booleen.

isThing = 0;

notThing = ( (isThing == 0) ? 1 : 0);

echo(notThing); // ECHO: 1

echo(num = is_num(notThing));   // ECHO: num = true
echo(bool = is_bool(notThing)); // ECHO: bool = false

ciao,
  Torsten.



More information about the Discuss mailing list