Thingiverse
OpenSCAD type detector
by arpruss
21
Downloads
8
Likes
0
Makes
This is a small library to detect the types of OpenSCAD variables/expressions. Publicly exposed functions are: `isVector(x)`, `isBoolean(x)`, `isFloat(x)`, `isDefiniteFloat(x)` (float, but not NaN or infinity), `isRange(x)`, `isString(x)` and `typeOf(x)`.
The last of these returns a string describing the type: `vector`, `boolean`, `float`, `range`, `string`, `undef`, `unknown`.
Googling showed other solutions to the type detection problem, but I worked to make my solution as efficient as
The last of these returns a string describing the type: `vector`, `boolean`, `float`, `range`, `string`, `undef`, `unknown`.
Googling showed other solutions to the type detection problem, but I worked to make my solution as efficient as
Sign in to leave a comment
Sign in